@tarojs/plugin-platform-harmony-ets 3.7.0-alpha.27 → 4.0.0-alpha.10
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.ts +6 -2
- package/dist/apis/base/crypto.ts +4 -0
- package/dist/apis/base/debug.ts +5 -0
- package/dist/apis/base/index.ts +9 -1
- package/dist/apis/base/performance.ts +8 -0
- package/dist/apis/base/system.ts +74 -21
- package/dist/apis/base/update.ts +5 -0
- package/dist/apis/base/weapp/app-event.ts +75 -0
- package/dist/apis/base/weapp/life-cycle.ts +21 -0
- package/dist/apis/canvas/index.ts +27 -0
- package/dist/apis/data-analysis/index.ts +6 -0
- package/dist/apis/device/accelerometer.ts +2 -1
- package/dist/apis/device/accessibility.ts +4 -0
- package/dist/apis/device/battery.ts +2 -2
- package/dist/apis/device/bluetooth-ble.ts +19 -0
- package/dist/apis/device/bluetooth-peripheral.ts +6 -0
- package/dist/apis/device/bluetooth.ts +16 -0
- package/dist/apis/device/calendar.ts +5 -0
- package/dist/apis/device/clipboard.ts +17 -9
- package/dist/apis/device/compass.ts +21 -0
- package/dist/apis/device/contact.ts +5 -0
- package/dist/apis/device/crypto.ts +4 -0
- package/dist/apis/device/gyroscope.ts +7 -0
- package/dist/apis/device/iBeacon.ts +10 -0
- package/dist/apis/device/index.ts +15 -0
- package/dist/apis/device/keyboard.ts +2 -1
- package/dist/apis/device/memory.ts +10 -3
- package/dist/apis/device/motion.ts +6 -0
- package/dist/apis/device/network.ts +26 -9
- package/dist/apis/device/nfc.ts +10 -0
- package/dist/apis/device/phone.ts +2 -1
- package/dist/apis/device/scan.ts +4 -0
- package/dist/apis/device/screen.ts +2 -1
- package/dist/apis/device/sms.ts +4 -0
- package/dist/apis/device/vibrate.ts +19 -11
- package/dist/apis/device/wifi.ts +15 -0
- package/dist/apis/ext/index.ts +5 -0
- package/dist/apis/files/index.ts +2 -1
- package/dist/apis/files/manager.ts +2 -1
- package/dist/apis/framework/index.ts +3 -8
- package/dist/apis/index.ts +27 -17
- package/dist/apis/location/index.ts +61 -68
- package/dist/apis/media/EditorContext.ts +32 -0
- package/dist/apis/media/audio/index.ts +18 -0
- package/dist/apis/media/background-audio/index.ts +16 -0
- package/dist/apis/media/camera.ts +16 -0
- package/dist/apis/media/common.ts +2 -1
- package/dist/apis/media/{image.ts → image/index.ts} +4 -3
- package/dist/apis/media/index.ts +10 -0
- package/dist/apis/media/live.ts +5 -0
- package/dist/apis/media/map.ts +4 -0
- package/dist/apis/media/media-recorder.ts +4 -0
- package/dist/apis/media/recorder.ts +6 -0
- package/dist/apis/media/video/VideoContext.ts +68 -0
- package/dist/apis/media/{video.ts → video/index.ts} +13 -2
- package/dist/apis/media/video-decoder.ts +4 -0
- package/dist/apis/media/video-processing.ts +4 -0
- package/dist/apis/media/voip.ts +19 -0
- package/dist/apis/network/index.ts +3 -0
- package/dist/apis/network/mdns.ts +13 -0
- package/dist/apis/network/request.ts +7 -6
- package/dist/apis/network/tcp.ts +4 -0
- package/dist/apis/network/udp.ts +4 -0
- package/dist/apis/network/webSocket.ts +2 -6
- package/dist/apis/open-api/account.ts +4 -0
- package/dist/apis/open-api/address.ts +4 -0
- package/dist/apis/open-api/authorize.ts +5 -0
- package/dist/apis/open-api/card.ts +5 -0
- package/dist/apis/open-api/channels-live.ts +11 -0
- package/dist/apis/open-api/customer-service.ts +4 -0
- package/dist/apis/open-api/device-voip.ts +5 -0
- package/dist/apis/open-api/facial.ts +7 -0
- package/dist/apis/open-api/favorites.ts +5 -0
- package/dist/apis/open-api/group.ts +4 -0
- package/dist/apis/open-api/index.ts +20 -6
- package/dist/apis/open-api/invoice.ts +5 -0
- package/dist/apis/open-api/license-plate.ts +4 -0
- package/dist/apis/open-api/login.ts +6 -0
- package/dist/apis/open-api/my-miniprogram.ts +4 -0
- package/dist/apis/open-api/privacy.ts +7 -0
- package/dist/apis/open-api/red-package.ts +4 -0
- package/dist/apis/open-api/settings.ts +5 -0
- package/dist/apis/open-api/soter.ts +6 -0
- package/dist/apis/open-api/subscribe-message.ts +6 -0
- package/dist/apis/open-api/{user-info/index.ts → user-info.ts} +1 -16
- package/dist/apis/open-api/werun.ts +5 -0
- package/dist/apis/payment/index.ts +6 -0
- package/dist/apis/route/index.ts +19 -28
- package/dist/apis/share/index.ts +33 -0
- package/dist/apis/storage/background-fetch.ts +7 -0
- package/dist/apis/storage/cache-manager.ts +4 -0
- package/dist/apis/storage/index.ts +158 -88
- package/dist/apis/ui/{animation.ts → animation/animation.ts} +73 -31
- package/dist/apis/ui/animation/index.ts +7 -0
- package/dist/apis/ui/background.ts +4 -19
- package/dist/apis/ui/custom-component.ts +8 -0
- package/dist/apis/ui/fonts.ts +4 -0
- package/dist/apis/ui/index.ts +8 -10
- package/dist/apis/ui/interaction/index.ts +45 -59
- package/dist/apis/ui/menu.ts +4 -0
- package/dist/apis/ui/navigation-bar/index.ts +60 -21
- package/dist/apis/ui/pull-down-refresh.ts +10 -4
- package/dist/apis/{page → ui/scroll}/index.ts +32 -27
- package/dist/apis/ui/sticky.ts +4 -0
- package/dist/apis/{tabbar/index.ts → ui/tab-bar.ts} +6 -8
- package/dist/apis/ui/window.ts +20 -0
- package/dist/apis/utils/handler.ts +4 -4
- package/dist/apis/utils/index.ts +1 -1
- package/dist/apis/worker/index.ts +4 -0
- package/dist/apis/wxml/IntersectionObserver.ts +24 -25
- package/dist/apis/wxml/index.ts +7 -2
- package/dist/apis/wxml/nodesRef.ts +2 -2
- package/dist/apis/wxml/selectorQuery.ts +29 -17
- package/dist/components-harmony-ets/button.ets +106 -80
- package/dist/components-harmony-ets/canvas.ets +51 -0
- package/dist/components-harmony-ets/checkbox.ets +82 -148
- package/dist/components-harmony-ets/form.ets +45 -132
- package/dist/components-harmony-ets/icon.ets +66 -69
- package/dist/components-harmony-ets/image.ets +26 -61
- package/dist/components-harmony-ets/index.ets +92 -0
- package/dist/components-harmony-ets/innerHtml.ets +7 -70
- package/dist/components-harmony-ets/input.ets +60 -146
- package/dist/components-harmony-ets/label.ets +86 -92
- package/dist/components-harmony-ets/listView.ets +26 -0
- package/dist/components-harmony-ets/movableArea.ets +124 -0
- package/dist/components-harmony-ets/movableView.ets +93 -0
- package/dist/components-harmony-ets/navigationBar.ets +65 -0
- package/dist/components-harmony-ets/pageMeta.ets +94 -0
- package/dist/components-harmony-ets/picker.ets +172 -198
- package/dist/components-harmony-ets/progress.ets +52 -0
- package/dist/components-harmony-ets/pseudo.ets +80 -0
- package/dist/components-harmony-ets/radio.ets +85 -155
- package/dist/components-harmony-ets/richText.ets +15 -87
- package/dist/components-harmony-ets/scrollList.ets +94 -0
- package/dist/components-harmony-ets/scrollView.ets +81 -149
- package/dist/components-harmony-ets/slider.ets +47 -94
- package/dist/components-harmony-ets/stickySection.ets +42 -0
- package/dist/components-harmony-ets/style.ets +396 -0
- package/dist/components-harmony-ets/swiper.ets +51 -151
- package/dist/components-harmony-ets/switch.ets +35 -76
- package/dist/components-harmony-ets/{index.ts → tag.ts} +6 -0
- package/dist/components-harmony-ets/text.ets +131 -76
- package/dist/components-harmony-ets/textArea.ets +64 -140
- package/dist/components-harmony-ets/utils/AttributeManager.ets +1 -1
- package/dist/components-harmony-ets/utils/DynamicCenter.ts +4 -13
- package/dist/components-harmony-ets/utils/constant/style.ets +9 -6
- package/dist/components-harmony-ets/utils/flexManager.ets +68 -85
- package/dist/components-harmony-ets/utils/helper.ets +18 -65
- package/dist/components-harmony-ets/utils/htmlParser/HarmonyHTMLParser.ts +1 -2
- package/dist/components-harmony-ets/utils/htmlParser/index.ts +1 -1
- package/dist/components-harmony-ets/utils/index.ts +55 -51
- package/dist/components-harmony-ets/utils/styles.ets +177 -65
- package/dist/components-harmony-ets/video.ets +70 -116
- package/dist/components-harmony-ets/view.ets +58 -64
- package/dist/components-harmony-ets/webView.ets +56 -0
- package/dist/index.d.ts +152 -0
- package/dist/index.js +230 -60
- package/dist/index.js.map +1 -1
- package/dist/runtime-ets/bom/document.ts +6 -4
- package/dist/runtime-ets/bom/getComputedStyle.ts +2 -2
- package/dist/runtime-ets/bom/window.ts +9 -2
- package/dist/runtime-ets/current.ts +3 -0
- package/dist/runtime-ets/dom/bind.ts +96 -0
- package/dist/runtime-ets/dom/class-list.ts +4 -6
- package/dist/runtime-ets/dom/comment.ts +1 -2
- package/dist/runtime-ets/dom/cssNesting.ts +409 -0
- package/dist/runtime-ets/dom/cssStyleDeclaration.ts +30 -20
- package/dist/runtime-ets/dom/dataSource.ts +64 -0
- package/dist/runtime-ets/dom/document.ts +36 -51
- package/dist/runtime-ets/dom/element/canvas.ts +136 -0
- package/dist/runtime-ets/dom/element/element.ts +439 -0
- package/dist/runtime-ets/dom/element/form.ts +403 -0
- package/dist/runtime-ets/dom/element/index.ts +120 -0
- package/dist/runtime-ets/dom/element/movableArea.ts +11 -0
- package/dist/runtime-ets/dom/element/movableView.ts +242 -0
- package/dist/runtime-ets/dom/element/normal.ts +103 -0
- package/dist/runtime-ets/dom/element/progress.ts +11 -0
- package/dist/runtime-ets/dom/element/scrollView.ts +15 -0
- package/dist/runtime-ets/dom/element/text.ts +10 -0
- package/dist/runtime-ets/dom/element/video.ts +50 -0
- package/dist/runtime-ets/dom/element/webView.ts +68 -0
- package/dist/runtime-ets/dom/event.ts +26 -5
- package/dist/runtime-ets/dom/eventTarget.ts +3 -3
- package/dist/runtime-ets/dom/node.ts +114 -49
- package/dist/runtime-ets/dom/stylesheet/covertWeb2Hm.ts +805 -0
- package/dist/runtime-ets/dom/stylesheet/index.ts +122 -429
- package/dist/runtime-ets/dom/stylesheet/type.ts +93 -17
- package/dist/runtime-ets/dom/stylesheet/util.ts +145 -17
- package/dist/runtime-ets/index.ts +2 -3
- package/dist/runtime-ets/interface/event.ts +3 -2
- package/dist/runtime-ets/utils/index.ts +87 -17
- package/dist/runtime-ets/utils/info.ts +21 -47
- package/dist/runtime-framework/react/app.ts +20 -28
- package/dist/runtime-framework/react/hooks.ts +3 -4
- package/dist/runtime-framework/react/index.ts +1 -2
- package/dist/runtime-framework/react/native-page.ts +421 -0
- package/dist/runtime-framework/react/page.ts +5 -17
- package/dist/runtime-framework/solid/app.ts +25 -45
- package/dist/runtime-framework/solid/connect.ts +21 -3
- package/dist/runtime-framework/solid/hooks.ts +17 -12
- package/dist/runtime-framework/solid/index.ts +6 -2
- package/dist/runtime-framework/solid/page.ts +84 -36
- package/dist/runtime-framework/solid/reconciler/props.ts +70 -25
- package/dist/runtime-framework/solid/reconciler/render.ts +16 -6
- package/dist/runtime-framework/solid/reconciler/use.ts +0 -1
- package/dist/runtime-framework/solid/utils/index.ts +0 -2
- package/dist/runtime-utils.d.ts +827 -0
- package/dist/runtime-utils.js +1633 -549
- package/dist/runtime-utils.js.map +1 -1
- package/dist/runtime.d.ts +1 -0
- package/dist/runtime.js +1633 -549
- package/dist/runtime.js.map +1 -1
- package/index.js +3 -1
- package/package.json +14 -15
- package/static/media/cancel.svg +1 -0
- package/static/media/circle.svg +1 -0
- package/static/media/clear.svg +1 -0
- package/static/media/download.svg +1 -0
- package/static/media/info.svg +1 -0
- package/static/media/info_circle.svg +1 -0
- package/static/media/search.svg +1 -0
- package/static/media/success.svg +1 -0
- package/static/media/success_no_circle.svg +1 -0
- package/static/media/taro_arrow_left.svg +1 -0
- package/static/media/taro_home.svg +1 -0
- package/static/media/waiting.svg +1 -0
- package/static/media/warn.svg +1 -0
- package/types/harmony.d.ts +4 -0
- package/types/index.d.ts +4 -0
- package/types/runtime.d.ts +7 -1
- package/LICENSE +0 -160
- package/dist/components-harmony-ets/base.ets +0 -63
- package/dist/components-harmony-ets/element.ets +0 -223
- package/dist/components-harmony-ets/utils/constant/icon.ts +0 -19
- package/dist/runtime-ets/dom/element.ts +0 -457
- package/dist/runtime-ets/dom/text.ts +0 -19
- package/dist/runtime-ets/utils/bind.ts +0 -35
- package/types/api.d.ts +0 -4
- /package/dist/runtime-framework/solid/{contant.ts → constant.ts} +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { AREA_CHANGE_EVENT_NAME, eventHandler, getComponentEventCallback, VISIBLE_CHANGE_EVENT_NAME, createTaroEvent } from '@tarojs/runtime'
|
|
2
|
+
|
|
3
|
+
import commonStyleModify from './style'
|
|
4
|
+
import { shouldBindEvent, getNodeThresholds } from './utils/helper'
|
|
5
|
+
|
|
6
|
+
import type { TaroAny, TaroWebViewElement, TaroEvent } from '@tarojs/runtime'
|
|
7
|
+
|
|
8
|
+
interface IPageLoad {
|
|
9
|
+
url: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface IError {
|
|
13
|
+
request: WebResourceRequest
|
|
14
|
+
error: WebResourceError
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@Component
|
|
18
|
+
export default struct TaroWebView {
|
|
19
|
+
@Builder customBuilder() {}
|
|
20
|
+
@BuilderParam createLazyChildren: (node: TaroWebViewElement) => void = this.customBuilder
|
|
21
|
+
@ObjectLink node: TaroWebViewElement
|
|
22
|
+
|
|
23
|
+
build () {
|
|
24
|
+
Web({ src: this.node._attrs.src, controller: this.node.controller })
|
|
25
|
+
.attributeModifier(commonStyleModify.setNode(this.node))
|
|
26
|
+
.onPageEnd((e: IPageLoad) => {
|
|
27
|
+
// 1. 创建消息端口
|
|
28
|
+
this.node.ports = this.node.controller.createWebMessagePorts(true)
|
|
29
|
+
// 2. 发送端口1到HTML5
|
|
30
|
+
this.node.controller.postMessage('init_web_messageport', [this.node.ports[1]], '*');
|
|
31
|
+
// 3. 保存端口0到本地
|
|
32
|
+
this.node.nativePort = this.node.ports[0]
|
|
33
|
+
// 4. 设置回调函数
|
|
34
|
+
this.node.nativePort.onMessageEventExt((result) => {
|
|
35
|
+
const message = this.node.handleMessageFromWeb(result)
|
|
36
|
+
const messageEvent: TaroEvent = createTaroEvent('message', { detail: { data: message } }, this.node)
|
|
37
|
+
|
|
38
|
+
eventHandler(messageEvent, 'message', this.node)
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
const onLoadEvent: TaroEvent = createTaroEvent('load', { detail: { src: this.node._attrs.src } }, this.node)
|
|
42
|
+
|
|
43
|
+
eventHandler(onLoadEvent, 'load', this.node)
|
|
44
|
+
})
|
|
45
|
+
.onErrorReceive(shouldBindEvent((e: IError) => {
|
|
46
|
+
const event: TaroEvent = createTaroEvent('error', { detail: { url: this.node._attrs.src, fullUrl: e.request.getRequestUrl() } }, this.node)
|
|
47
|
+
|
|
48
|
+
eventHandler(event, 'error', this.node)
|
|
49
|
+
}, this.node, ['error']))
|
|
50
|
+
.onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
|
|
51
|
+
.onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
|
|
52
|
+
this.node._nodeInfo.areaInfo = res[1]
|
|
53
|
+
}))
|
|
54
|
+
.onVisibleAreaChange(getNodeThresholds(this.node) || [0.0, 1.0], getComponentEventCallback(this.node, VISIBLE_CHANGE_EVENT_NAME))
|
|
55
|
+
}
|
|
56
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
2
|
+
import { IFileType, TConfig, TaroPlatform, IPluginContext, TaroPlatformBase } from "@tarojs/service";
|
|
3
|
+
import { PLATFORM_TYPE } from "@tarojs/shared";
|
|
4
|
+
declare abstract class TaroPlatformHarmony<T extends TConfig = TConfig> extends TaroPlatform<T> {
|
|
5
|
+
platformType: PLATFORM_TYPE;
|
|
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";
|
|
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> | undefined;
|
|
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 {
|
|
148
|
+
disableArkTS?: boolean;
|
|
149
|
+
useConfigName?: string;
|
|
150
|
+
}
|
|
151
|
+
declare const _default: (ctx: IPluginContext, options?: IOptions) => void;
|
|
152
|
+
export { _default as default, HarmonyOS_ArkTS, HarmonyOS_JSUI, IOptions };
|