@tarojs/taro 3.7.0-alpha.25 → 3.7.0-alpha.27
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/html.css +9 -0
- package/package.json +5 -5
- package/types/api/base/system.d.ts +2 -2
- package/types/api/data-analysis/index.d.ts +51 -1
- package/types/api/device/accelerometer.d.ts +8 -6
- package/types/api/device/accessibility.d.ts +1 -1
- package/types/api/device/battery.d.ts +3 -3
- package/types/api/device/bluetooth-ble.d.ts +40 -17
- package/types/api/device/bluetooth-peripheral.d.ts +26 -26
- package/types/api/device/bluetooth.d.ts +37 -13
- package/types/api/device/calendar.d.ts +11 -1
- package/types/api/device/clipboard.d.ts +17 -17
- package/types/api/device/compass.d.ts +5 -5
- package/types/api/device/gyroscope.d.ts +4 -4
- package/types/api/device/iBeacon.d.ts +10 -8
- package/types/api/device/keyboard.d.ts +7 -5
- package/types/api/device/memory.d.ts +3 -4
- package/types/api/device/motion.d.ts +8 -6
- package/types/api/device/network.d.ts +12 -6
- package/types/api/device/nfc.d.ts +13 -13
- package/types/api/device/phone.d.ts +1 -1
- package/types/api/device/scan.d.ts +5 -3
- package/types/api/device/screen.d.ts +28 -12
- package/types/api/device/sms.d.ts +1 -1
- package/types/api/device/vibrate.d.ts +5 -5
- package/types/api/device/wifi.d.ts +25 -13
- package/types/api/files/index.d.ts +71 -41
- package/types/api/location/index.d.ts +166 -18
- package/types/api/media/camera.d.ts +6 -3
- package/types/api/media/image.d.ts +1 -1
- package/types/api/navigate/index.d.ts +2 -0
- package/types/api/network/request.d.ts +1 -1
- package/types/api/route/index.d.ts +5 -5
- package/types/api/storage/background-fetch.d.ts +63 -11
- package/types/api/storage/cache-manager.d.ts +51 -0
- package/types/api/storage/index.d.ts +125 -10
- package/types/api/taro.extend.d.ts +1 -1
- package/types/api/ui/animation.d.ts +1 -1
- package/types/api/ui/fonts.d.ts +4 -3
- package/types/api/ui/interaction.d.ts +4 -4
- package/types/api/ui/pull-down-refresh.d.ts +2 -2
- package/types/api/ui/scroll.d.ts +1 -1
- package/types/api/ui/tab-bar.d.ts +7 -7
- package/types/api/wxml/index.d.ts +4 -4
- package/types/compile/config/h5.d.ts +7 -1
- package/types/compile/config/harmony.d.ts +77 -0
- package/types/compile/config/index.d.ts +1 -0
- package/types/compile/config/mini.d.ts +14 -8
- package/types/compile/config/plugin.d.ts +34 -0
- package/types/compile/config/project.d.ts +3 -0
- package/types/compile/config/util.d.ts +3 -1
- package/types/compile/viteCompilerContext.d.ts +24 -5
- package/types/taro.config.d.ts +6 -0
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import type { RecursiveTemplate, UnRecursiveTemplate } from '@tarojs/shared/dist/template'
|
|
2
|
+
import type { PluginContext } from 'rollup'
|
|
1
3
|
import type { AppConfig, PageConfig } from '../index'
|
|
2
|
-
import type { IMiniFilesConfig, IH5Config, IMiniAppConfig } from './config'
|
|
4
|
+
import type { IMiniFilesConfig, IH5Config, IHarmonyConfig, IMiniAppConfig } from './config'
|
|
3
5
|
import type { IProjectConfig } from './config/project'
|
|
4
|
-
import type {
|
|
5
|
-
import { IComponentConfig } from "./hooks"
|
|
6
|
-
|
|
7
|
-
import type { RecursiveTemplate, UnRecursiveTemplate } from '@tarojs/shared/dist/template'
|
|
6
|
+
import type { IComponentConfig } from './hooks'
|
|
8
7
|
|
|
9
8
|
export interface ViteNativeCompMeta {
|
|
10
9
|
name: string
|
|
@@ -48,6 +47,14 @@ export interface ViteH5BuildConfig extends CommonBuildConfig, IH5Config<'vite'>
|
|
|
48
47
|
runtimePath?: string | string[]
|
|
49
48
|
}
|
|
50
49
|
|
|
50
|
+
export interface ViteHarmonyBuildConfig extends CommonBuildConfig, IHarmonyConfig {
|
|
51
|
+
fileType: IFileType
|
|
52
|
+
useETS?: boolean
|
|
53
|
+
useJSON5?: boolean
|
|
54
|
+
runtimePath?: string | string[]
|
|
55
|
+
taroComponentsPath: string
|
|
56
|
+
}
|
|
57
|
+
|
|
51
58
|
export interface CommonBuildConfig extends IProjectConfig<'vite'> {
|
|
52
59
|
entry: {
|
|
53
60
|
app: string | string[]
|
|
@@ -91,6 +98,7 @@ export interface ViteCompilerContext<T> {
|
|
|
91
98
|
frameworkExts: string[]
|
|
92
99
|
app: ViteAppMeta
|
|
93
100
|
pages: VitePageMeta[]
|
|
101
|
+
components?: VitePageMeta[]
|
|
94
102
|
loaderMeta: any
|
|
95
103
|
logger
|
|
96
104
|
filesConfig: IMiniFilesConfig
|
|
@@ -117,6 +125,17 @@ export interface ViteH5CompilerContext extends ViteCompilerContext<ViteH5BuildCo
|
|
|
117
125
|
browserslist: string[]
|
|
118
126
|
}
|
|
119
127
|
|
|
128
|
+
export interface ViteHarmonyCompilerContext extends ViteCompilerContext<ViteHarmonyBuildConfig> {
|
|
129
|
+
fileType: ViteFileType
|
|
130
|
+
commonChunks: string[]
|
|
131
|
+
getCommonChunks: () => string[]
|
|
132
|
+
modifyHarmonyConfig: (config: Partial<AppConfig>) => void
|
|
133
|
+
modifyHostPackageDep: (outDir: string, deps?: Record<string, string>, devDeps?: Record<string, string>) => void
|
|
134
|
+
getScriptPath: (filePath: string) => string
|
|
135
|
+
getStylePath: (filePath: string) => string
|
|
136
|
+
getConfigPath: (filePath: string) => string
|
|
137
|
+
}
|
|
138
|
+
|
|
120
139
|
export interface ViteMiniCompilerContext extends ViteCompilerContext<ViteMiniBuildConfig> {
|
|
121
140
|
fileType: ViteFileType
|
|
122
141
|
commonChunks: string[]
|
package/types/taro.config.d.ts
CHANGED
|
@@ -175,6 +175,12 @@ declare module './index' {
|
|
|
175
175
|
* @default false
|
|
176
176
|
*/
|
|
177
177
|
enableShareTimeline?: boolean
|
|
178
|
+
/**
|
|
179
|
+
* 页面是否需要使用 \<page-meta\> 和 \<navigation-bar\> 组件
|
|
180
|
+
* @default false
|
|
181
|
+
* @support weapp, alipay
|
|
182
|
+
*/
|
|
183
|
+
enablePageMeta?: boolean
|
|
178
184
|
/** 页面自定义组件配置
|
|
179
185
|
* @see https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/
|
|
180
186
|
*/
|