@tarojs/plugin-platform-harmony-ets 4.1.0-alpha.1 → 4.1.0-alpha.3
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/dist/apis/apis.d.ts +19 -0
- package/dist/apis/base/crypto.d.ts +1 -0
- package/dist/apis/base/debug.d.ts +3 -0
- package/dist/apis/base/index.d.ts +10 -0
- package/dist/apis/base/performance.d.ts +5 -0
- package/dist/apis/base/system.d.ts +3 -0
- package/dist/apis/base/update.d.ts +2 -0
- package/dist/apis/base/weapp/app-event.d.ts +19 -0
- package/dist/apis/base/weapp/life-cycle.d.ts +3 -0
- package/dist/apis/canvas/index.d.ts +10 -0
- package/dist/apis/data-analysis/index.d.ts +4 -0
- package/dist/apis/device/accelerometer.d.ts +17 -0
- package/dist/apis/device/accessibility.d.ts +1 -0
- package/dist/apis/device/battery.d.ts +3 -0
- package/dist/apis/device/bluetooth-ble.d.ts +16 -0
- package/dist/apis/device/bluetooth-peripheral.d.ts +3 -0
- package/dist/apis/device/bluetooth.d.ts +13 -0
- package/dist/apis/device/calendar.d.ts +2 -0
- package/dist/apis/device/clipboard.d.ts +9 -0
- package/dist/apis/device/compass.d.ts +16 -0
- package/dist/apis/device/contact.d.ts +2 -0
- package/dist/apis/device/crypto.d.ts +1 -0
- package/dist/apis/device/gyroscope.d.ts +4 -0
- package/dist/apis/device/iBeacon.d.ts +7 -0
- package/dist/apis/device/index.d.ts +24 -0
- package/dist/apis/device/keyboard.d.ts +5 -0
- package/dist/apis/device/memory.d.ts +2 -0
- package/dist/apis/device/motion.d.ts +4 -0
- package/dist/apis/device/network.d.ts +14 -0
- package/dist/apis/device/nfc.d.ts +7 -0
- package/dist/apis/device/phone.d.ts +2 -0
- package/dist/apis/device/scan.d.ts +1 -0
- package/dist/apis/device/screen.d.ts +10 -0
- package/dist/apis/device/sms.d.ts +1 -0
- package/dist/apis/device/vibrate.d.ts +3 -0
- package/dist/apis/device/wifi.d.ts +12 -0
- package/dist/apis/ext/index.d.ts +2 -0
- package/dist/apis/files/index.d.ts +32 -0
- package/dist/apis/files/manager.d.ts +28 -0
- package/dist/apis/framework/index.d.ts +18 -0
- package/dist/apis/index.d.ts +22 -0
- package/dist/apis/location/index.d.ts +13 -0
- package/dist/apis/media/EditorContext.d.ts +16 -0
- package/dist/apis/media/audio/index.d.ts +12 -0
- package/dist/apis/media/background-audio/index.d.ts +12 -0
- package/dist/apis/media/camera.d.ts +2 -0
- package/dist/apis/media/common.d.ts +3 -0
- package/dist/apis/media/image/index.d.ts +6 -0
- package/dist/apis/media/index.d.ts +13 -0
- package/dist/apis/media/live.d.ts +2 -0
- package/dist/apis/media/map.d.ts +1 -0
- package/dist/apis/media/media-recorder.d.ts +1 -0
- package/dist/apis/media/recorder.d.ts +3 -0
- package/dist/apis/media/video/index.d.ts +7 -0
- package/dist/apis/media/video-decoder.d.ts +1 -0
- package/dist/apis/media/video-processing.d.ts +1 -0
- package/dist/apis/media/voip.d.ts +16 -0
- package/dist/apis/navigate/index.d.ts +5 -0
- package/dist/apis/network/downloadFile.d.ts +2 -0
- package/dist/apis/network/index.d.ts +7 -0
- package/dist/apis/network/mdns.d.ts +10 -0
- package/dist/apis/network/request.d.ts +2 -0
- package/dist/apis/network/tcp.d.ts +1 -0
- package/dist/apis/network/udp.d.ts +1 -0
- package/dist/apis/network/uploadFile.d.ts +2 -0
- package/dist/apis/network/webSocket.d.ts +2 -0
- package/dist/apis/open-api/account.d.ts +1 -0
- package/dist/apis/open-api/address.d.ts +1 -0
- package/dist/apis/open-api/authorize.d.ts +2 -0
- package/dist/apis/open-api/card.d.ts +2 -0
- package/dist/apis/open-api/channels-live.d.ts +8 -0
- package/dist/apis/open-api/customer-service.d.ts +1 -0
- package/dist/apis/open-api/device-voip.d.ts +2 -0
- package/dist/apis/open-api/facial.d.ts +4 -0
- package/dist/apis/open-api/favorites.d.ts +2 -0
- package/dist/apis/open-api/group.d.ts +1 -0
- package/dist/apis/open-api/index.d.ts +21 -0
- package/dist/apis/open-api/invoice.d.ts +2 -0
- package/dist/apis/open-api/license-plate.d.ts +1 -0
- package/dist/apis/open-api/login.d.ts +3 -0
- package/dist/apis/open-api/my-miniprogram.d.ts +1 -0
- package/dist/apis/open-api/privacy.d.ts +4 -0
- package/dist/apis/open-api/red-package.d.ts +1 -0
- package/dist/apis/open-api/settings.d.ts +2 -0
- package/dist/apis/open-api/soter.d.ts +3 -0
- package/dist/apis/open-api/subscribe-message.d.ts +2 -0
- package/dist/apis/open-api/user-info.d.ts +15 -0
- package/dist/apis/open-api/werun.d.ts +2 -0
- package/dist/apis/payment/index.d.ts +3 -0
- package/dist/apis/route/index.d.ts +10 -0
- package/dist/apis/share/index.d.ts +20 -0
- package/dist/apis/storage/background-fetch.d.ts +4 -0
- package/dist/apis/storage/cache-manager.d.ts +1 -0
- package/dist/apis/storage/index.d.ts +19 -0
- package/dist/apis/ui/animation/animation.d.ts +56 -0
- package/dist/apis/ui/animation/index.d.ts +3 -0
- package/dist/apis/ui/background.d.ts +2 -0
- package/dist/apis/ui/custom-component.d.ts +2 -0
- package/dist/apis/ui/fonts.d.ts +1 -0
- package/dist/apis/ui/index.d.ts +12 -0
- package/dist/apis/ui/interaction/index.d.ts +8 -0
- package/dist/apis/ui/menu.d.ts +1 -0
- package/dist/apis/ui/navigation-bar/index.d.ts +6 -0
- package/dist/apis/ui/pull-down-refresh.d.ts +3 -0
- package/dist/apis/ui/scroll/index.d.ts +5 -0
- package/dist/apis/ui/sticky.d.ts +1 -0
- package/dist/apis/ui/tab-bar.d.ts +9 -0
- package/dist/apis/ui/window.d.ts +14 -0
- package/dist/apis/utils/handler.d.ts +46 -0
- package/dist/apis/utils/index.d.ts +17 -0
- package/dist/apis/utils/permissions.d.ts +5 -0
- package/dist/apis/utils/types.d.ts +11 -0
- package/dist/apis/utils/validate.d.ts +39 -0
- package/dist/apis/worker/index.d.ts +1 -0
- package/dist/apis/wxml/IntersectionObserver.d.ts +12 -0
- package/dist/apis/wxml/index.d.ts +7 -0
- package/dist/apis/wxml/nodesRef.d.ts +14 -0
- package/dist/apis/wxml/selectorQuery.d.ts +39 -0
- package/dist/components/components-harmony-ets/tag.d.ts +53 -0
- package/dist/components/components-harmony-ets/utils/DynamicCenter.d.ts +7 -0
- package/dist/components/components-harmony-ets/utils/events.d.ts +3 -0
- package/dist/components/components-harmony-ets/utils/htmlParser/HarmonyHTMLParser.d.ts +11 -0
- package/dist/components/components-harmony-ets/utils/htmlParser/index.d.ts +3 -0
- package/dist/components/components-harmony-ets/utils/index.d.ts +11 -0
- package/dist/components/components-react.d.ts +7 -0
- package/dist/components/components-react.js +2 -41
- package/dist/components/components-react.js.map +1 -1
- package/dist/components/index.d.ts +119 -0
- package/dist/index.d.ts +6 -148
- package/dist/index.js.map +1 -1
- package/dist/program/arkTS.d.ts +40 -0
- package/dist/program/harmony.d.ts +36 -0
- package/dist/program/jsUI.d.ts +60 -0
- package/dist/runtime-ets/bom/URL.d.ts +2 -0
- package/dist/runtime-ets/bom/document.d.ts +2 -0
- package/dist/runtime-ets/bom/getComputedStyle.d.ts +1 -0
- package/dist/runtime-ets/bom/history.d.ts +1 -0
- package/dist/runtime-ets/bom/location.d.ts +1 -0
- package/dist/runtime-ets/bom/navigator.d.ts +1 -0
- package/dist/runtime-ets/bom/raf.d.ts +1 -0
- package/dist/runtime-ets/bom/window.d.ts +20 -0
- package/dist/runtime-ets/constant.d.ts +17 -0
- package/dist/runtime-ets/current.d.ts +4 -0
- package/dist/runtime-ets/dom/bind.d.ts +4 -0
- package/dist/runtime-ets/dom/class-list.d.ts +15 -0
- package/dist/runtime-ets/dom/comment.d.ts +5 -0
- package/dist/runtime-ets/dom/cssNesting.d.ts +7 -0
- package/dist/runtime-ets/dom/cssStyleDeclaration.d.ts +14 -0
- package/dist/runtime-ets/dom/document.d.ts +20 -0
- package/dist/runtime-ets/dom/element/index.d.ts +14 -0
- package/dist/runtime-ets/dom/element/movableArea.d.ts +5 -0
- package/dist/runtime-ets/dom/element/progress.d.ts +5 -0
- package/dist/runtime-ets/dom/element/text.d.ts +5 -0
- package/dist/runtime-ets/dom/element/webView.d.ts +15 -0
- package/dist/runtime-ets/dom/event-source.d.ts +1 -0
- package/dist/runtime-ets/dom/event.d.ts +24 -0
- package/dist/runtime-ets/dom/eventTarget.d.ts +17 -0
- package/dist/runtime-ets/dom/node.d.ts +62 -0
- package/dist/runtime-ets/dom/stylesheet/covertWeb2Hm.d.ts +3 -0
- package/dist/runtime-ets/dom/stylesheet/index.d.ts +83 -0
- package/dist/runtime-ets/emitter/emitter.d.ts +1 -0
- package/dist/runtime-ets/env.d.ts +1 -0
- package/dist/runtime-ets/index.d.ts +22 -0
- package/dist/runtime-ets/interface/event.d.ts +9 -0
- package/dist/runtime-ets/interface/index.d.ts +6 -0
- package/dist/runtime-ets/utils/index.d.ts +26 -0
- package/dist/runtime-ets/utils/info.d.ts +11 -0
- package/dist/runtime-ets/utils/router.d.ts +1 -0
- package/dist/runtime-framework/react/app.d.ts +12 -0
- package/dist/runtime-framework/react/connect.d.ts +1 -0
- package/dist/runtime-framework/react/constant.d.ts +5 -0
- package/dist/runtime-framework/react/hooks.d.ts +30 -0
- package/dist/runtime-framework/react/index.d.ts +5 -0
- package/dist/runtime-framework/react/native-page.d.ts +8 -0
- package/dist/runtime-framework/react/page.d.ts +13 -0
- package/dist/runtime-framework/react/utils/index.d.ts +7 -0
- package/dist/runtime-framework/react/utils/is.d.ts +10 -0
- package/dist/runtime-framework/solid/app.d.ts +10 -0
- package/dist/runtime-framework/solid/connect.d.ts +4 -0
- package/dist/runtime-framework/solid/constant.d.ts +5 -0
- package/dist/runtime-framework/solid/hooks.d.ts +30 -0
- package/dist/runtime-framework/solid/index.d.ts +4 -0
- package/dist/runtime-framework/solid/page.d.ts +13 -0
- package/dist/runtime-framework/solid/reconciler/h.d.ts +8 -0
- package/dist/runtime-framework/solid/reconciler/index.d.ts +3 -0
- package/dist/runtime-framework/solid/reconciler/props.d.ts +7 -0
- package/dist/runtime-framework/solid/reconciler/render.d.ts +16 -0
- package/dist/runtime-framework/solid/reconciler/use.d.ts +1 -0
- package/dist/runtime-framework/solid/utils/index.d.ts +16 -0
- package/dist/runtime-framework/solid/utils/is.d.ts +10 -0
- package/dist/runtime-utils.d.ts +4 -818
- package/dist/runtime-utils.js +393 -393
- package/dist/runtime-utils.js.map +1 -1
- package/dist/runtime.js +393 -393
- package/dist/runtime.js.map +1 -1
- package/dist/template.d.ts +43 -0
- package/dist/utils/api-loader.d.ts +1 -0
- package/dist/utils/constants.d.ts +4 -0
- package/dist/utils/index.d.ts +3 -0
- package/package.json +10 -10
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
type NormalParamSchema = string[];
|
|
2
|
+
type ObjectParamSchema = Record<string, string>;
|
|
3
|
+
type Schema = NormalParamSchema | ObjectParamSchema;
|
|
4
|
+
interface ValidateParams {
|
|
5
|
+
<T>(name: string, params: any, schema: Schema): asserts params is T;
|
|
6
|
+
}
|
|
7
|
+
export declare function shouldBeObject(target: unknown): {
|
|
8
|
+
flag: boolean;
|
|
9
|
+
msg?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
flag: boolean;
|
|
12
|
+
msg: string;
|
|
13
|
+
};
|
|
14
|
+
interface IParameterErrorParam {
|
|
15
|
+
name?: string;
|
|
16
|
+
para?: string;
|
|
17
|
+
correct?: string;
|
|
18
|
+
wrong?: unknown;
|
|
19
|
+
level?: 'warn' | 'error' | 'log' | 'info' | 'debug';
|
|
20
|
+
}
|
|
21
|
+
export declare function getParameterError({ name, para, correct, wrong, level }: IParameterErrorParam): string;
|
|
22
|
+
export declare function upperCaseFirstLetter(string: string): string;
|
|
23
|
+
export declare function assertType(target: any, type: string, methodName: string, paramName?: string): void;
|
|
24
|
+
/**
|
|
25
|
+
* 用于校验方法的参数类型
|
|
26
|
+
* @param name 方法名称
|
|
27
|
+
* @param params [array|object] 当前参数
|
|
28
|
+
* @param schema [array|object] 参数类型规范
|
|
29
|
+
* @example
|
|
30
|
+
* ```js
|
|
31
|
+
* // 例子一:
|
|
32
|
+
* validateParams(methodA, [key], [string])
|
|
33
|
+
* // 例子二:
|
|
34
|
+
* validateParams(methodB, { key: 123 }, { key: number })
|
|
35
|
+
* ```
|
|
36
|
+
* @todo 校验可选参数
|
|
37
|
+
*/
|
|
38
|
+
export declare const validateParams: ValidateParams;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const createWorker: (option?: {}, ...args: any[]) => Promise<Partial<import("../utils/handler").ICallbackResult> & Record<string, unknown> & import("../utils/handler").ICallbackResult>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type Taro from '@tarojs/taro/types';
|
|
2
|
+
export declare class IntersectionObserver implements Taro.IntersectionObserver {
|
|
3
|
+
private _component;
|
|
4
|
+
private _observerNodes;
|
|
5
|
+
private _options;
|
|
6
|
+
constructor(component: any, options?: Taro.createIntersectionObserver.Option);
|
|
7
|
+
disconnect(): void;
|
|
8
|
+
observe(targetSelector: string, callback: Taro.IntersectionObserver.ObserveCallback): void;
|
|
9
|
+
relativeTo(): Taro.IntersectionObserver;
|
|
10
|
+
relativeToViewport(): Taro.IntersectionObserver;
|
|
11
|
+
private handleResult;
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IntersectionObserver } from './IntersectionObserver';
|
|
2
|
+
import { SelectorQuery } from './selectorQuery';
|
|
3
|
+
import type Taro from '@tarojs/taro/types';
|
|
4
|
+
export declare const createSelectorQuery: () => SelectorQuery;
|
|
5
|
+
export declare const createIntersectionObserver: typeof Taro.createIntersectionObserver;
|
|
6
|
+
export declare const createMediaQueryObserver: (option?: {}, ...args: any[]) => Promise<Partial<import("../utils/handler").ICallbackResult> & Record<string, unknown> & import("../utils/handler").ICallbackResult>;
|
|
7
|
+
export { IntersectionObserver };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SelectorQuery } from './selectorQuery';
|
|
2
|
+
import type Taro from '@tarojs/taro/types';
|
|
3
|
+
export declare class NodesRef implements Taro.NodesRef {
|
|
4
|
+
_component?: any;
|
|
5
|
+
_selector: string;
|
|
6
|
+
_selectorQuery: SelectorQuery;
|
|
7
|
+
_single: boolean;
|
|
8
|
+
constructor(selector: string, querySelectorQuery: SelectorQuery, single: boolean);
|
|
9
|
+
context(cb: any): SelectorQuery;
|
|
10
|
+
node(cb?: Taro.NodesRef.NodeCallback): SelectorQuery;
|
|
11
|
+
boundingClientRect(cb?: Taro.NodesRef.BoundingClientRectCallback): SelectorQuery;
|
|
12
|
+
scrollOffset(cb: any): SelectorQuery;
|
|
13
|
+
fields(fields: Taro.NodesRef.Fields, cb?: Taro.NodesRef.FieldsCallback): SelectorQuery;
|
|
14
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { NodesRef } from './nodesRef';
|
|
2
|
+
import type Taro from '@tarojs/taro/types';
|
|
3
|
+
interface ISelectorQueryQueue {
|
|
4
|
+
component: any;
|
|
5
|
+
selector: string;
|
|
6
|
+
single: boolean;
|
|
7
|
+
fields: any;
|
|
8
|
+
}
|
|
9
|
+
type TSelectorQueryQueueCallback = (res: ISelectorQueryQueue) => void;
|
|
10
|
+
export declare class SelectorQuery implements Taro.SelectorQuery {
|
|
11
|
+
_queue: ISelectorQueryQueue[];
|
|
12
|
+
_queueCb: (TSelectorQueryQueueCallback | null)[];
|
|
13
|
+
_component?: any;
|
|
14
|
+
constructor();
|
|
15
|
+
/**
|
|
16
|
+
* 设置选择器的选取范围
|
|
17
|
+
* @param component 指定组件
|
|
18
|
+
* @return selectQuery 返回查询对象
|
|
19
|
+
*/
|
|
20
|
+
in: (_: any) => this;
|
|
21
|
+
/**
|
|
22
|
+
* 在当前页面下选择第一个匹配选择器selector的节点
|
|
23
|
+
* @param selector
|
|
24
|
+
* @return nodesRef 返回一个NodesRef 对象实例,可以用于获取节点信息
|
|
25
|
+
*/
|
|
26
|
+
select(selector: string): NodesRef;
|
|
27
|
+
/**
|
|
28
|
+
* 在当前页面下选择匹配选择器selector的所有节点
|
|
29
|
+
* @param selector
|
|
30
|
+
*/
|
|
31
|
+
selectAll(selector: string): NodesRef;
|
|
32
|
+
/**
|
|
33
|
+
* 选择显示区域。可用于获取显示区域的尺寸、滚动位置等信息
|
|
34
|
+
*/
|
|
35
|
+
selectViewport(): NodesRef;
|
|
36
|
+
exec(cb?: (...args: any[]) => any): any;
|
|
37
|
+
_push(selector: any, component: any, single: any, fields: any, callback?: Taro.NodesRef.FieldsCallback | null): void;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export declare const TaroViewTagName = "view";
|
|
2
|
+
export declare const TaroIconTagName = "icon";
|
|
3
|
+
export declare const TaroProgressTagName = "progress";
|
|
4
|
+
export declare const TaroRichTextTagName = "rich-text";
|
|
5
|
+
export declare const TaroTextTagName = "text";
|
|
6
|
+
export declare const TaroButtonTagName = "button";
|
|
7
|
+
export declare const TaroCheckboxTagName = "checkbox";
|
|
8
|
+
export declare const TaroCheckboxGroupTagName = "checkbox-group";
|
|
9
|
+
export declare const TaroFormTagName = "form";
|
|
10
|
+
export declare const TaroInputTagName = "input";
|
|
11
|
+
export declare const TaroLabelTagName = "label";
|
|
12
|
+
export declare const TaroPickerTagName = "picker";
|
|
13
|
+
export declare const TaroPickerViewTagName = "picker-view";
|
|
14
|
+
export declare const TaroPickerViewColumnTagName = "picker-view-column";
|
|
15
|
+
export declare const TaroRadioTagName = "radio";
|
|
16
|
+
export declare const TaroRadioGroupTagName = "radio-group";
|
|
17
|
+
export declare const TaroSliderTagName = "slider";
|
|
18
|
+
export declare const TaroSwitchTagName = "switch";
|
|
19
|
+
export declare const TaroCoverImageTagName = "cover-image";
|
|
20
|
+
export declare const TaroTextareaTagName = "textarea";
|
|
21
|
+
export declare const TaroCoverViewTagName = "cover-view";
|
|
22
|
+
export declare const TaroMovableAreaTagName = "movable-area";
|
|
23
|
+
export declare const TaroMovableViewTagName = "movable-view";
|
|
24
|
+
export declare const TaroScrollViewTagName = "scroll-view";
|
|
25
|
+
export declare const TaroSwiperTagName = "swiper";
|
|
26
|
+
export declare const TaroSwiperItemTagName = "swiper-item";
|
|
27
|
+
export declare const TaroNavigatorTagName = "navigator";
|
|
28
|
+
export declare const TaroAudioTagName = "audio";
|
|
29
|
+
export declare const TaroCameraTagName = "camera";
|
|
30
|
+
export declare const TaroImageTagName = "image";
|
|
31
|
+
export declare const TaroLivePlayerTagName = "live-player";
|
|
32
|
+
export declare const TaroVideoTagName = "video";
|
|
33
|
+
export declare const TaroCanvasTagName = "canvas";
|
|
34
|
+
export declare const TaroAdTagName = "ad";
|
|
35
|
+
export declare const TaroWebViewTagName = "web-view";
|
|
36
|
+
export declare const TaroBlockTagName = "block";
|
|
37
|
+
export declare const TaroMapTagName = "map";
|
|
38
|
+
export declare const TaroPageMetaTagName = "page-meta";
|
|
39
|
+
export declare const TaroNavigationBarTagName = "navigation-bar";
|
|
40
|
+
export declare const TaroSlotTagName = "slot";
|
|
41
|
+
export declare const TaroNativeSlotTagName = "native-slot";
|
|
42
|
+
export declare const TaroCustomWrapperTagName = "custom-wrapper";
|
|
43
|
+
export declare const TaroSpanTagName = "span";
|
|
44
|
+
export declare const TaroTabsTagName = "tabs";
|
|
45
|
+
export declare const TaroTabBarTagName = "tab-bar";
|
|
46
|
+
export declare const TaroTabContentTagName = "tab-content";
|
|
47
|
+
export declare const TaroListTagName = "list";
|
|
48
|
+
export declare const TaroListItemTagName = "list-item";
|
|
49
|
+
export declare const TaroOpenDataTagName = "open-data";
|
|
50
|
+
export declare const TaroIgnoreTagName = "ignore";
|
|
51
|
+
export declare const TaroStickySectionTagName = "sticky-section";
|
|
52
|
+
export declare const TaroStickyHeaderTagName = "sticky-header";
|
|
53
|
+
export declare const TaroListViewTagName = "list-view";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="types/runtime" />
|
|
2
|
+
import { TaroAny, TaroElement } from '@tarojs/runtime';
|
|
3
|
+
export declare class DynamicCenter {
|
|
4
|
+
install(node: TaroElement, parentNode: TaroElement): void;
|
|
5
|
+
uninstall(node: TaroElement): void;
|
|
6
|
+
bindComponentToNodeWithDFS(node: TaroElement, component: TaroAny): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type TTreeNode = {
|
|
2
|
+
type: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
content?: string;
|
|
5
|
+
attributes?: Record<string, string>;
|
|
6
|
+
children?: TTreeNode[];
|
|
7
|
+
endIndex?: number;
|
|
8
|
+
selfClosing?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare function parseHTML(htmlString: string): TTreeNode[];
|
|
11
|
+
export default parseHTML;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="types/runtime" />
|
|
2
|
+
import type { TaroRichTextElement } from '@tarojs/runtime';
|
|
3
|
+
export declare function getSingleSelector(range: any, rangeKey: any): any[];
|
|
4
|
+
export declare function getMultiSelector(ctx: any, range: any, rangeKey: any, value: any): any;
|
|
5
|
+
export declare function getUnit(val: string | number): string;
|
|
6
|
+
export declare function generateText(node: TaroRichTextElement): string;
|
|
7
|
+
export declare function computeBackgroundPosition(style: any): {
|
|
8
|
+
offsetX: any;
|
|
9
|
+
offsetY: any;
|
|
10
|
+
};
|
|
11
|
+
export declare function convertVp2Px(val: string | number): number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from '@tarojs/components/mini';
|
|
2
|
+
export declare const Span = "span";
|
|
3
|
+
export declare const Tabs = "tabs";
|
|
4
|
+
export declare const TabBar = "tab-bar";
|
|
5
|
+
export declare const TabContent = "tab-content";
|
|
6
|
+
export declare const List = "list";
|
|
7
|
+
export declare const ListItem = "list-item";
|
|
@@ -1,43 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
const Icon = 'icon';
|
|
3
|
-
const Progress = 'progress';
|
|
4
|
-
const RichText = 'rich-text';
|
|
5
|
-
const Text = 'text';
|
|
6
|
-
const Button = 'button';
|
|
7
|
-
const Checkbox = 'checkbox';
|
|
8
|
-
const CheckboxGroup = 'checkbox-group';
|
|
9
|
-
const Form = 'form';
|
|
10
|
-
const Input = 'input';
|
|
11
|
-
const Label = 'label';
|
|
12
|
-
const Picker = 'picker';
|
|
13
|
-
const PickerView = 'picker-view';
|
|
14
|
-
const PickerViewColumn = 'picker-view-column';
|
|
15
|
-
const Radio = 'radio';
|
|
16
|
-
const RadioGroup = 'radio-group';
|
|
17
|
-
const Slider = 'slider';
|
|
18
|
-
const Switch = 'switch';
|
|
19
|
-
const CoverImage = 'cover-image';
|
|
20
|
-
const Textarea = 'textarea';
|
|
21
|
-
const CoverView = 'cover-view';
|
|
22
|
-
const MovableArea = 'movable-area';
|
|
23
|
-
const MovableView = 'movable-view';
|
|
24
|
-
const ScrollView = 'scroll-view';
|
|
25
|
-
const Swiper = 'swiper';
|
|
26
|
-
const SwiperItem = 'swiper-item';
|
|
27
|
-
const Navigator = 'navigator';
|
|
28
|
-
const Audio = 'audio';
|
|
29
|
-
const Camera = 'camera';
|
|
30
|
-
const Image = 'image';
|
|
31
|
-
const LivePlayer = 'live-player';
|
|
32
|
-
const Video = 'video';
|
|
33
|
-
const Canvas = 'canvas';
|
|
34
|
-
const Ad = 'ad';
|
|
35
|
-
const WebView = 'web-view';
|
|
36
|
-
const Block = 'block';
|
|
37
|
-
const Map = 'map';
|
|
38
|
-
const Slot = 'slot';
|
|
39
|
-
const NativeSlot = 'native-slot';
|
|
40
|
-
const CustomWrapper = 'custom-wrapper';
|
|
1
|
+
export * from '@tarojs/components/mini';
|
|
41
2
|
|
|
42
3
|
// For React.createElement's type
|
|
43
4
|
const Span = 'span';
|
|
@@ -47,5 +8,5 @@ const TabContent = 'tab-content';
|
|
|
47
8
|
const List = 'list';
|
|
48
9
|
const ListItem = 'list-item';
|
|
49
10
|
|
|
50
|
-
export {
|
|
11
|
+
export { List, ListItem, Span, TabBar, TabContent, Tabs };
|
|
51
12
|
//# sourceMappingURL=components-react.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-react.js","sources":["../../src/components/components-react.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"components-react.js","sources":["../../src/components/components-react.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AAEO,MAAM,IAAI,GAAG,OAAM;AACnB,MAAM,IAAI,GAAG,OAAM;AACnB,MAAM,MAAM,GAAG,UAAS;AACxB,MAAM,UAAU,GAAG,cAAa;AAChC,MAAM,IAAI,GAAG,OAAM;AACnB,MAAM,QAAQ,GAAG;;;;"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
export declare const components: {
|
|
2
|
+
Checkbox: {
|
|
3
|
+
'group-id': string;
|
|
4
|
+
cn: string;
|
|
5
|
+
};
|
|
6
|
+
Span: {};
|
|
7
|
+
Tabs: {
|
|
8
|
+
index: string;
|
|
9
|
+
vertical: string;
|
|
10
|
+
bindchange: string;
|
|
11
|
+
};
|
|
12
|
+
TabBar: {
|
|
13
|
+
mode: string;
|
|
14
|
+
};
|
|
15
|
+
TabContent: {
|
|
16
|
+
scrollable: string;
|
|
17
|
+
};
|
|
18
|
+
List: {
|
|
19
|
+
scrollpage: string;
|
|
20
|
+
cachedcount: string;
|
|
21
|
+
scrollbar: string;
|
|
22
|
+
scrolleffect: string;
|
|
23
|
+
indexer: string;
|
|
24
|
+
indexercircle: string;
|
|
25
|
+
indexermulti: string;
|
|
26
|
+
indexerbubble: string;
|
|
27
|
+
divider: string;
|
|
28
|
+
shapemode: string;
|
|
29
|
+
itemscale: string;
|
|
30
|
+
itemcenter: string;
|
|
31
|
+
updateeffect: string;
|
|
32
|
+
chainanimation: string;
|
|
33
|
+
scrollvibrate: string;
|
|
34
|
+
initialindex: string;
|
|
35
|
+
initialoffset: string;
|
|
36
|
+
selected: string;
|
|
37
|
+
bindindexerchange: string;
|
|
38
|
+
bindscroll: string;
|
|
39
|
+
bindscrollbottom: string;
|
|
40
|
+
bindscrolltop: string;
|
|
41
|
+
bindscrollend: string;
|
|
42
|
+
bindscrolltouchup: string;
|
|
43
|
+
bindrequestitem: string;
|
|
44
|
+
};
|
|
45
|
+
ListItem: {
|
|
46
|
+
type: string;
|
|
47
|
+
primary: string;
|
|
48
|
+
section: string;
|
|
49
|
+
sticky: string;
|
|
50
|
+
stickyradius: string;
|
|
51
|
+
clickeffect: string;
|
|
52
|
+
bindsticky: string;
|
|
53
|
+
};
|
|
54
|
+
Switch: {
|
|
55
|
+
showtext: string;
|
|
56
|
+
texton: string;
|
|
57
|
+
textoff: string;
|
|
58
|
+
};
|
|
59
|
+
Textarea: {
|
|
60
|
+
headericon: string;
|
|
61
|
+
showcounter: string;
|
|
62
|
+
menuoptions: string;
|
|
63
|
+
softkeyboardenabled: string;
|
|
64
|
+
bindtranslate: string;
|
|
65
|
+
bindshare: string;
|
|
66
|
+
bindsearch: string;
|
|
67
|
+
bindoptionselect: string;
|
|
68
|
+
bindselectchange: string;
|
|
69
|
+
};
|
|
70
|
+
Progress: {
|
|
71
|
+
'active-color': string;
|
|
72
|
+
'background-color': string;
|
|
73
|
+
type: string;
|
|
74
|
+
'font-size': string;
|
|
75
|
+
secondarypercent: string;
|
|
76
|
+
clockwise: string;
|
|
77
|
+
};
|
|
78
|
+
Slider: {
|
|
79
|
+
showsteps: string;
|
|
80
|
+
showtips: string;
|
|
81
|
+
};
|
|
82
|
+
Input: {
|
|
83
|
+
'placeholder-color': string;
|
|
84
|
+
};
|
|
85
|
+
Video: {
|
|
86
|
+
speed: string;
|
|
87
|
+
bindloadedmetadata: string;
|
|
88
|
+
bindprogress: string;
|
|
89
|
+
bindtap: string;
|
|
90
|
+
};
|
|
91
|
+
Image: {
|
|
92
|
+
alt: string;
|
|
93
|
+
};
|
|
94
|
+
Radio: {
|
|
95
|
+
'group-id': string;
|
|
96
|
+
};
|
|
97
|
+
Picker: {
|
|
98
|
+
selected: string;
|
|
99
|
+
hours: string;
|
|
100
|
+
containsecond: string;
|
|
101
|
+
vibrate: string;
|
|
102
|
+
lunar: string;
|
|
103
|
+
lunarswitch: string;
|
|
104
|
+
};
|
|
105
|
+
PickerView: {
|
|
106
|
+
mode: string;
|
|
107
|
+
range: string;
|
|
108
|
+
selected: string;
|
|
109
|
+
hours: string;
|
|
110
|
+
indicatorprefix: string;
|
|
111
|
+
indicatorsuffix: string;
|
|
112
|
+
containsecond: string;
|
|
113
|
+
vibrate: string;
|
|
114
|
+
lunar: string;
|
|
115
|
+
lunarswitch: string;
|
|
116
|
+
bindcolumnchange: string;
|
|
117
|
+
cn: string;
|
|
118
|
+
};
|
|
119
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,152 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
globalObject: string;
|
|
7
|
-
abstract fileType: IFileType;
|
|
8
|
-
abstract useETS: boolean;
|
|
9
|
-
abstract useJSON5: boolean;
|
|
10
|
-
taroComponentsPath: string;
|
|
11
|
-
/**
|
|
12
|
-
* 1. 清空 dist 文件夹
|
|
13
|
-
* 2. 输出编译提示
|
|
14
|
-
*/
|
|
15
|
-
private setup;
|
|
16
|
-
private setupHarmonyApp;
|
|
17
|
-
protected printDevelopmentTip(): void;
|
|
18
|
-
/**
|
|
19
|
-
* 返回当前项目内的 runner 包
|
|
20
|
-
*/
|
|
21
|
-
protected getRunner(): Promise<any>;
|
|
22
|
-
/**
|
|
23
|
-
* 准备 runner 参数
|
|
24
|
-
* @param extraOptions 需要额外合入 Options 的配置项
|
|
25
|
-
*/
|
|
26
|
-
protected getOptions(extraOptions?: {}): any;
|
|
27
|
-
/**
|
|
28
|
-
* 调用 runner 开始编译
|
|
29
|
-
* @param extraOptions 需要额外传入 runner 的配置项
|
|
30
|
-
*/
|
|
31
|
-
private build;
|
|
32
|
-
private buildHarmonyApp;
|
|
33
|
-
/**
|
|
34
|
-
* 调用 runner 开启编译
|
|
35
|
-
*/
|
|
36
|
-
start(): Promise<void>;
|
|
37
|
-
}
|
|
38
|
-
declare class Harmony extends TaroPlatformHarmony {
|
|
39
|
-
#private;
|
|
40
|
-
platform: string;
|
|
41
|
-
globalObject: string;
|
|
42
|
-
fileType: {
|
|
43
|
-
templ: string;
|
|
44
|
-
style: string;
|
|
45
|
-
config: string;
|
|
46
|
-
script: string;
|
|
47
|
-
};
|
|
48
|
-
useETS: boolean;
|
|
49
|
-
useJSON5: boolean;
|
|
50
|
-
runtimePath: string[] | string;
|
|
51
|
-
taroComponentsPath: string;
|
|
52
|
-
apiEntryList: RegExp[];
|
|
53
|
-
constructor(ctx: IPluginContext, config: TConfig);
|
|
54
|
-
get framework(): "solid" | "vue3" | "react" | "preact" | "none";
|
|
55
|
-
get aliasFramework(): string;
|
|
56
|
-
get apiLibrary(): string;
|
|
57
|
-
get apiEntry(): RegExp[];
|
|
58
|
-
get componentLibrary(): string;
|
|
59
|
-
get runtimeLibrary(): string;
|
|
60
|
-
get runtimeFrameworkLibrary(): string;
|
|
61
|
-
get defineConstants(): Record<string, string>;
|
|
62
|
-
extensions: string[];
|
|
63
|
-
excludeLibraries: (string | RegExp)[];
|
|
64
|
-
externalDeps: [
|
|
65
|
-
string,
|
|
66
|
-
RegExp,
|
|
67
|
-
string?
|
|
68
|
-
][];
|
|
69
|
-
harmonyScope: RegExp[];
|
|
70
|
-
indexOfLibraries(lib: string): number;
|
|
71
|
-
removeFromLibraries(lib: string): void;
|
|
72
|
-
moveLibraries(lib: string, target?: string, basedir?: string, sync?: boolean): void;
|
|
73
|
-
replaceDefineValue(code: string, define: Record<string, string>, ext?: string): string;
|
|
74
|
-
/**
|
|
75
|
-
* 修改 Vite 配置
|
|
76
|
-
*/
|
|
77
|
-
modifyViteConfig(): void;
|
|
78
|
-
handleResourceEmit(outDir: string, basedir?: string): void;
|
|
79
|
-
}
|
|
80
|
-
declare module HarmonyWrapper {
|
|
81
|
-
export { Harmony };
|
|
82
|
-
}
|
|
83
|
-
import HarmonyOS_ArkTS = HarmonyWrapper.Harmony;
|
|
84
|
-
declare class Harmony$0 extends TaroPlatformBase {
|
|
85
|
-
platform: string;
|
|
86
|
-
globalObject: string;
|
|
87
|
-
runtimePath: string;
|
|
88
|
-
taroComponentsPath: string;
|
|
89
|
-
fileType: {
|
|
90
|
-
templ: string;
|
|
91
|
-
style: string;
|
|
92
|
-
config: string;
|
|
93
|
-
script: string;
|
|
94
|
-
};
|
|
95
|
-
template: any;
|
|
96
|
-
/**
|
|
97
|
-
* 1. setupTransaction - init
|
|
98
|
-
* 2. setup
|
|
99
|
-
* 3. setupTransaction - close
|
|
100
|
-
* 4. buildTransaction - init
|
|
101
|
-
* 5. build
|
|
102
|
-
* 6. buildTransaction - close
|
|
103
|
-
*/
|
|
104
|
-
constructor(ctx: any, config: any);
|
|
105
|
-
/**
|
|
106
|
-
* 增加组件或修改组件属性
|
|
107
|
-
*/
|
|
108
|
-
modifyComponents(): void;
|
|
109
|
-
/**
|
|
110
|
-
* 不需要转 rpx
|
|
111
|
-
*/
|
|
112
|
-
modifyPostcssConfigs(config: Record<string, any>): void;
|
|
113
|
-
/**
|
|
114
|
-
* 模板自定义组件 js
|
|
115
|
-
* 等鸿蒙支持 template 后需要重构
|
|
116
|
-
*/
|
|
117
|
-
addEntry(): void;
|
|
118
|
-
/**
|
|
119
|
-
* 把 app、pages、自定义组件的 js 改造为鸿蒙的 export default 导出形式
|
|
120
|
-
*/
|
|
121
|
-
modifyTaroExport(): void;
|
|
122
|
-
/**
|
|
123
|
-
* 修改最终的编译产物
|
|
124
|
-
* 1. 生成模板自定义组件的 xml、css 文件
|
|
125
|
-
* 2. 删除多余的文件
|
|
126
|
-
* 3. 把 components-harmony 中被使用到的组件移动到输出目录
|
|
127
|
-
*/
|
|
128
|
-
modifyBuildAssets(ctx: any, config: any): void;
|
|
129
|
-
modifyWebpackConfig(): void;
|
|
130
|
-
modifyHarmonyConfig(pages: any, { projectPath, hapName, name }: {
|
|
131
|
-
projectPath: any;
|
|
132
|
-
hapName: any;
|
|
133
|
-
name: any;
|
|
134
|
-
}): void;
|
|
135
|
-
modifyHostPackage({ projectPath, hapName }: {
|
|
136
|
-
projectPath: any;
|
|
137
|
-
hapName?: string | undefined;
|
|
138
|
-
}): Promise<any>;
|
|
139
|
-
getChunkEntryModule(compilation: any, chunk: any, compiler?: string): any;
|
|
140
|
-
checkMetaType(entryModule: any): boolean;
|
|
141
|
-
isHarmonyRequest(request: string): boolean;
|
|
142
|
-
}
|
|
143
|
-
declare module HarmonyWrapper {
|
|
144
|
-
export { Harmony$0 as Harmony };
|
|
145
|
-
}
|
|
146
|
-
import HarmonyOS_JSUI = HarmonyWrapper.Harmony;
|
|
147
|
-
interface IOptions {
|
|
1
|
+
import HarmonyOS_ArkTS from './program/arkTS';
|
|
2
|
+
import HarmonyOS_JSUI from './program/jsUI';
|
|
3
|
+
import type { IPluginContext } from '@tarojs/service';
|
|
4
|
+
export { HarmonyOS_ArkTS, HarmonyOS_JSUI };
|
|
5
|
+
export interface IOptions {
|
|
148
6
|
disableArkTS?: boolean;
|
|
149
7
|
useConfigName?: string;
|
|
150
8
|
}
|
|
151
9
|
declare const _default: (ctx: IPluginContext, options?: IOptions) => void;
|
|
152
|
-
export
|
|
10
|
+
export default _default;
|