@tarojs/plugin-platform-harmony-ets 4.0.8-beta.0 → 4.0.8-beta.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.
Files changed (207) hide show
  1. package/dist/apis/apis.d.ts +19 -0
  2. package/dist/apis/base/crypto.d.ts +1 -0
  3. package/dist/apis/base/debug.d.ts +3 -0
  4. package/dist/apis/base/index.d.ts +10 -0
  5. package/dist/apis/base/performance.d.ts +5 -0
  6. package/dist/apis/base/system.d.ts +3 -0
  7. package/dist/apis/base/update.d.ts +2 -0
  8. package/dist/apis/base/weapp/app-event.d.ts +19 -0
  9. package/dist/apis/base/weapp/life-cycle.d.ts +3 -0
  10. package/dist/apis/canvas/index.d.ts +10 -0
  11. package/dist/apis/data-analysis/index.d.ts +4 -0
  12. package/dist/apis/device/accelerometer.d.ts +17 -0
  13. package/dist/apis/device/accessibility.d.ts +1 -0
  14. package/dist/apis/device/battery.d.ts +3 -0
  15. package/dist/apis/device/bluetooth-ble.d.ts +16 -0
  16. package/dist/apis/device/bluetooth-peripheral.d.ts +3 -0
  17. package/dist/apis/device/bluetooth.d.ts +13 -0
  18. package/dist/apis/device/calendar.d.ts +2 -0
  19. package/dist/apis/device/clipboard.d.ts +9 -0
  20. package/dist/apis/device/compass.d.ts +16 -0
  21. package/dist/apis/device/contact.d.ts +2 -0
  22. package/dist/apis/device/crypto.d.ts +1 -0
  23. package/dist/apis/device/gyroscope.d.ts +4 -0
  24. package/dist/apis/device/iBeacon.d.ts +7 -0
  25. package/dist/apis/device/index.d.ts +24 -0
  26. package/dist/apis/device/keyboard.d.ts +5 -0
  27. package/dist/apis/device/memory.d.ts +2 -0
  28. package/dist/apis/device/motion.d.ts +4 -0
  29. package/dist/apis/device/network.d.ts +14 -0
  30. package/dist/apis/device/nfc.d.ts +7 -0
  31. package/dist/apis/device/phone.d.ts +2 -0
  32. package/dist/apis/device/scan.d.ts +1 -0
  33. package/dist/apis/device/screen.d.ts +10 -0
  34. package/dist/apis/device/sms.d.ts +1 -0
  35. package/dist/apis/device/vibrate.d.ts +3 -0
  36. package/dist/apis/device/wifi.d.ts +12 -0
  37. package/dist/apis/ext/index.d.ts +2 -0
  38. package/dist/apis/files/index.d.ts +32 -0
  39. package/dist/apis/files/manager.d.ts +28 -0
  40. package/dist/apis/framework/index.d.ts +18 -0
  41. package/dist/apis/index.d.ts +22 -0
  42. package/dist/apis/location/index.d.ts +13 -0
  43. package/dist/apis/media/EditorContext.d.ts +16 -0
  44. package/dist/apis/media/audio/index.d.ts +12 -0
  45. package/dist/apis/media/background-audio/index.d.ts +12 -0
  46. package/dist/apis/media/camera.d.ts +2 -0
  47. package/dist/apis/media/common.d.ts +3 -0
  48. package/dist/apis/media/image/index.d.ts +6 -0
  49. package/dist/apis/media/index.d.ts +13 -0
  50. package/dist/apis/media/live.d.ts +2 -0
  51. package/dist/apis/media/map.d.ts +1 -0
  52. package/dist/apis/media/media-recorder.d.ts +1 -0
  53. package/dist/apis/media/recorder.d.ts +3 -0
  54. package/dist/apis/media/video/index.d.ts +7 -0
  55. package/dist/apis/media/video-decoder.d.ts +1 -0
  56. package/dist/apis/media/video-processing.d.ts +1 -0
  57. package/dist/apis/media/voip.d.ts +16 -0
  58. package/dist/apis/navigate/index.d.ts +5 -0
  59. package/dist/apis/network/downloadFile.d.ts +2 -0
  60. package/dist/apis/network/index.d.ts +7 -0
  61. package/dist/apis/network/mdns.d.ts +10 -0
  62. package/dist/apis/network/request.d.ts +2 -0
  63. package/dist/apis/network/tcp.d.ts +1 -0
  64. package/dist/apis/network/udp.d.ts +1 -0
  65. package/dist/apis/network/uploadFile.d.ts +2 -0
  66. package/dist/apis/network/webSocket.d.ts +2 -0
  67. package/dist/apis/open-api/account.d.ts +1 -0
  68. package/dist/apis/open-api/address.d.ts +1 -0
  69. package/dist/apis/open-api/authorize.d.ts +2 -0
  70. package/dist/apis/open-api/card.d.ts +2 -0
  71. package/dist/apis/open-api/channels-live.d.ts +8 -0
  72. package/dist/apis/open-api/customer-service.d.ts +1 -0
  73. package/dist/apis/open-api/device-voip.d.ts +2 -0
  74. package/dist/apis/open-api/facial.d.ts +4 -0
  75. package/dist/apis/open-api/favorites.d.ts +2 -0
  76. package/dist/apis/open-api/group.d.ts +1 -0
  77. package/dist/apis/open-api/index.d.ts +21 -0
  78. package/dist/apis/open-api/invoice.d.ts +2 -0
  79. package/dist/apis/open-api/license-plate.d.ts +1 -0
  80. package/dist/apis/open-api/login.d.ts +3 -0
  81. package/dist/apis/open-api/my-miniprogram.d.ts +1 -0
  82. package/dist/apis/open-api/privacy.d.ts +4 -0
  83. package/dist/apis/open-api/red-package.d.ts +1 -0
  84. package/dist/apis/open-api/settings.d.ts +2 -0
  85. package/dist/apis/open-api/soter.d.ts +3 -0
  86. package/dist/apis/open-api/subscribe-message.d.ts +2 -0
  87. package/dist/apis/open-api/user-info.d.ts +15 -0
  88. package/dist/apis/open-api/werun.d.ts +2 -0
  89. package/dist/apis/payment/index.d.ts +3 -0
  90. package/dist/apis/route/index.d.ts +10 -0
  91. package/dist/apis/share/index.d.ts +20 -0
  92. package/dist/apis/storage/background-fetch.d.ts +4 -0
  93. package/dist/apis/storage/cache-manager.d.ts +1 -0
  94. package/dist/apis/storage/index.d.ts +19 -0
  95. package/dist/apis/ui/animation/animation.d.ts +56 -0
  96. package/dist/apis/ui/animation/index.d.ts +3 -0
  97. package/dist/apis/ui/background.d.ts +2 -0
  98. package/dist/apis/ui/custom-component.d.ts +2 -0
  99. package/dist/apis/ui/fonts.d.ts +1 -0
  100. package/dist/apis/ui/index.d.ts +12 -0
  101. package/dist/apis/ui/interaction/index.d.ts +8 -0
  102. package/dist/apis/ui/menu.d.ts +1 -0
  103. package/dist/apis/ui/navigation-bar/index.d.ts +6 -0
  104. package/dist/apis/ui/pull-down-refresh.d.ts +3 -0
  105. package/dist/apis/ui/scroll/index.d.ts +5 -0
  106. package/dist/apis/ui/sticky.d.ts +1 -0
  107. package/dist/apis/ui/tab-bar.d.ts +9 -0
  108. package/dist/apis/ui/window.d.ts +14 -0
  109. package/dist/apis/utils/handler.d.ts +46 -0
  110. package/dist/apis/utils/index.d.ts +17 -0
  111. package/dist/apis/utils/permissions.d.ts +5 -0
  112. package/dist/apis/utils/types.d.ts +11 -0
  113. package/dist/apis/utils/validate.d.ts +39 -0
  114. package/dist/apis/worker/index.d.ts +1 -0
  115. package/dist/apis/wxml/IntersectionObserver.d.ts +12 -0
  116. package/dist/apis/wxml/index.d.ts +7 -0
  117. package/dist/apis/wxml/nodesRef.d.ts +14 -0
  118. package/dist/apis/wxml/selectorQuery.d.ts +39 -0
  119. package/dist/components/components-harmony-ets/tag.d.ts +53 -0
  120. package/dist/components/components-harmony-ets/utils/DynamicCenter.d.ts +7 -0
  121. package/dist/components/components-harmony-ets/utils/events.d.ts +3 -0
  122. package/dist/components/components-harmony-ets/utils/htmlParser/HarmonyHTMLParser.d.ts +11 -0
  123. package/dist/components/components-harmony-ets/utils/htmlParser/index.d.ts +3 -0
  124. package/dist/components/components-harmony-ets/utils/index.d.ts +11 -0
  125. package/dist/components/components-react.d.ts +7 -0
  126. package/dist/components/components-react.js +2 -41
  127. package/dist/components/components-react.js.map +1 -1
  128. package/dist/components/index.d.ts +119 -0
  129. package/dist/index.d.ts +6 -148
  130. package/dist/index.js +12 -8
  131. package/dist/index.js.map +1 -1
  132. package/dist/program/arkTS.d.ts +40 -0
  133. package/dist/program/harmony.d.ts +36 -0
  134. package/dist/program/jsUI.d.ts +60 -0
  135. package/dist/runtime-ets/bom/URL.d.ts +2 -0
  136. package/dist/runtime-ets/bom/document.d.ts +2 -0
  137. package/dist/runtime-ets/bom/getComputedStyle.d.ts +1 -0
  138. package/dist/runtime-ets/bom/history.d.ts +1 -0
  139. package/dist/runtime-ets/bom/location.d.ts +1 -0
  140. package/dist/runtime-ets/bom/navigator.d.ts +1 -0
  141. package/dist/runtime-ets/bom/raf.d.ts +1 -0
  142. package/dist/runtime-ets/bom/window.d.ts +20 -0
  143. package/dist/runtime-ets/constant.d.ts +17 -0
  144. package/dist/runtime-ets/current.d.ts +4 -0
  145. package/dist/runtime-ets/dom/bind.d.ts +4 -0
  146. package/dist/runtime-ets/dom/class-list.d.ts +15 -0
  147. package/dist/runtime-ets/dom/comment.d.ts +5 -0
  148. package/dist/runtime-ets/dom/cssNesting.d.ts +7 -0
  149. package/dist/runtime-ets/dom/cssStyleDeclaration.d.ts +14 -0
  150. package/dist/runtime-ets/dom/document.d.ts +20 -0
  151. package/dist/runtime-ets/dom/element/element.ts +49 -42
  152. package/dist/runtime-ets/dom/element/index.d.ts +14 -0
  153. package/dist/runtime-ets/dom/element/movableArea.d.ts +5 -0
  154. package/dist/runtime-ets/dom/element/progress.d.ts +5 -0
  155. package/dist/runtime-ets/dom/element/text.d.ts +5 -0
  156. package/dist/runtime-ets/dom/element/webView.d.ts +15 -0
  157. package/dist/runtime-ets/dom/event-source.d.ts +1 -0
  158. package/dist/runtime-ets/dom/event.d.ts +24 -0
  159. package/dist/runtime-ets/dom/eventTarget.d.ts +17 -0
  160. package/dist/runtime-ets/dom/node.d.ts +62 -0
  161. package/dist/runtime-ets/dom/stylesheet/covertWeb2Hm.d.ts +3 -0
  162. package/dist/runtime-ets/dom/stylesheet/covertWeb2Hm.ts +1 -0
  163. package/dist/runtime-ets/dom/stylesheet/index.d.ts +83 -0
  164. package/dist/runtime-ets/emitter/emitter.d.ts +1 -0
  165. package/dist/runtime-ets/env.d.ts +1 -0
  166. package/dist/runtime-ets/index.d.ts +22 -0
  167. package/dist/runtime-ets/interface/event.d.ts +9 -0
  168. package/dist/runtime-ets/interface/index.d.ts +6 -0
  169. package/dist/runtime-ets/utils/index.d.ts +26 -0
  170. package/dist/runtime-ets/utils/info.d.ts +11 -0
  171. package/dist/runtime-ets/utils/router.d.ts +1 -0
  172. package/dist/runtime-framework/react/app.d.ts +12 -0
  173. package/dist/runtime-framework/react/connect.d.ts +1 -0
  174. package/dist/runtime-framework/react/constant.d.ts +5 -0
  175. package/dist/runtime-framework/react/hooks.d.ts +31 -0
  176. package/dist/runtime-framework/react/hooks.ts +1 -0
  177. package/dist/runtime-framework/react/index.d.ts +5 -0
  178. package/dist/runtime-framework/react/native-page.d.ts +8 -0
  179. package/dist/runtime-framework/react/native-page.ts +6 -6
  180. package/dist/runtime-framework/react/page.d.ts +13 -0
  181. package/dist/runtime-framework/react/utils/index.d.ts +7 -0
  182. package/dist/runtime-framework/react/utils/is.d.ts +10 -0
  183. package/dist/runtime-framework/solid/app.d.ts +10 -0
  184. package/dist/runtime-framework/solid/connect.d.ts +4 -0
  185. package/dist/runtime-framework/solid/constant.d.ts +5 -0
  186. package/dist/runtime-framework/solid/hooks.d.ts +31 -0
  187. package/dist/runtime-framework/solid/hooks.ts +1 -0
  188. package/dist/runtime-framework/solid/index.d.ts +4 -0
  189. package/dist/runtime-framework/solid/page.d.ts +13 -0
  190. package/dist/runtime-framework/solid/reconciler/h.d.ts +8 -0
  191. package/dist/runtime-framework/solid/reconciler/index.d.ts +3 -0
  192. package/dist/runtime-framework/solid/reconciler/props.d.ts +7 -0
  193. package/dist/runtime-framework/solid/reconciler/props.ts +1 -1
  194. package/dist/runtime-framework/solid/reconciler/render.d.ts +16 -0
  195. package/dist/runtime-framework/solid/reconciler/use.d.ts +1 -0
  196. package/dist/runtime-framework/solid/utils/index.d.ts +16 -0
  197. package/dist/runtime-framework/solid/utils/is.d.ts +10 -0
  198. package/dist/runtime-utils.d.ts +4 -818
  199. package/dist/runtime-utils.js +394 -394
  200. package/dist/runtime-utils.js.map +1 -1
  201. package/dist/runtime.js +394 -394
  202. package/dist/runtime.js.map +1 -1
  203. package/dist/template.d.ts +43 -0
  204. package/dist/utils/api-loader.d.ts +1 -0
  205. package/dist/utils/constants.d.ts +4 -0
  206. package/dist/utils/index.d.ts +3 -0
  207. package/package.json +13 -12
@@ -0,0 +1,31 @@
1
+ /// <reference types="types/runtime" />
2
+ import type { TFunc } from '@tarojs/runtime';
3
+ /** LifeCycle */
4
+ export declare const useDidHide: (fn: TFunc) => void;
5
+ export declare const useDidShow: (fn: TFunc) => void;
6
+ /** App */
7
+ export declare const useError: (fn: TFunc) => void;
8
+ export declare const useUnhandledRejection: (fn: TFunc) => void;
9
+ export declare const useLaunch: (fn: TFunc) => void;
10
+ export declare const usePageNotFound: (fn: TFunc) => void;
11
+ /** Page */
12
+ export declare const useLoad: (fn: TFunc) => void;
13
+ export declare const usePageScroll: (fn: TFunc) => void;
14
+ export declare const usePullDownRefresh: (fn: TFunc) => void;
15
+ export declare const usePullIntercept: (fn: TFunc) => void;
16
+ export declare const useReachBottom: (fn: TFunc) => void;
17
+ export declare const useResize: (fn: TFunc) => void;
18
+ export declare const useUnload: (fn: TFunc) => void;
19
+ /** Mini-Program */
20
+ export declare const useAddToFavorites: (fn: TFunc) => void;
21
+ export declare const useOptionMenuClick: (fn: TFunc) => void;
22
+ export declare const useKeyboardHeight: (fn: TFunc) => void;
23
+ export declare const useSaveExitState: (fn: TFunc) => void;
24
+ export declare const useShareAppMessage: (fn: TFunc) => void;
25
+ export declare const useShareTimeline: (fn: TFunc) => void;
26
+ export declare const useTitleClick: (fn: TFunc) => void;
27
+ /** Router */
28
+ export declare const useReady: (fn: TFunc) => void;
29
+ export declare const useRouter: (dynamic?: boolean) => import("@tarojs/runtime/dist/current").Router | null;
30
+ export declare const useTabItemTap: (fn: TFunc) => void;
31
+ export declare const useScope: () => undefined;
@@ -84,6 +84,7 @@ export const useUnload = createTaroHook('onUnload')
84
84
  /** Mini-Program */
85
85
  export const useAddToFavorites = createTaroHook('onAddToFavorites')
86
86
  export const useOptionMenuClick = createTaroHook('onOptionMenuClick')
87
+ export const useKeyboardHeight = createTaroHook('onKeyboardHeight')
87
88
  export const useSaveExitState = createTaroHook('onSaveExitState')
88
89
  export const useShareAppMessage = createTaroHook('onShareAppMessage')
89
90
  export const useShareTimeline = createTaroHook('onShareTimeline')
@@ -0,0 +1,5 @@
1
+ export * from './app';
2
+ export * from './connect';
3
+ export * from './hooks';
4
+ export * from './native-page';
5
+ export * from './page';
@@ -0,0 +1,8 @@
1
+ import type * as React from 'react';
2
+ declare let ReactDOM: any;
3
+ export declare function setPageById(inst: any, id: string): void;
4
+ export declare function getPageById(id: string): any;
5
+ export declare function removePageById(id: string): void;
6
+ export declare function createNativePageConfig(Component: any, pageName: string, react: typeof React, reactDOM: typeof ReactDOM, pageConfig: any): Record<string, any>;
7
+ export declare function createNativeComponentConfig(Component: any, react: typeof React, reactDOM: any, componentConfig: any): Record<string, any>;
8
+ export {};
@@ -26,7 +26,7 @@ interface InitNativeComponentEntryParams {
26
26
  R: typeof React
27
27
  ReactDOM: typeof ReactDOM
28
28
  cb?: TFunc
29
- // 是否使用默认的 DOM 入口 - app;默认为true,false的时候,会创建一个新的dom并且把它挂载在 app 下面
29
+ // 是否使用默认的 DOM 入口 - app;默认为 true,false 的时候,会创建一个新的 dom 并且把它挂载在 app 下面
30
30
  isDefaultEntryDom?: boolean
31
31
  isUseReact18?: boolean
32
32
  }
@@ -320,7 +320,7 @@ export function createNativePageConfig (
320
320
  const $taroPath = this.$taroPath
321
321
  // 销毁当前页面的上下文信息
322
322
  window.trigger(CONTEXT_ACTIONS.DESTORY, $taroPath)
323
- // 触发onUnload生命周期
323
+ // 触发 onUnload 生命周期
324
324
  safeExecute($taroPath, ONUNLOAD)
325
325
 
326
326
 
@@ -381,7 +381,7 @@ export function createNativePageConfig (
381
381
 
382
382
  function resetCurrent () {
383
383
  if (Current.page === this) {
384
- // 小程序插件页面卸载之后返回到宿主页面时,需重置Current页面和路由。否则引发插件组件二次加载异常 fix:#11991
384
+ // 小程序插件页面卸载之后返回到宿主页面时,需重置 Current 页面和路由。否则引发插件组件二次加载异常 fix:#11991
385
385
  Current.page = null
386
386
  Current.router = null
387
387
  }
@@ -418,12 +418,12 @@ export function createNativePageConfig (
418
418
  export function createNativeComponentConfig (
419
419
  Component,
420
420
  react: typeof React,
421
- reactdom,
421
+ reactDOM,
422
422
  componentConfig
423
423
  ) {
424
424
  reactMeta.R = react
425
425
  h = react.createElement
426
- ReactDOM = reactdom
426
+ ReactDOM = reactDOM
427
427
  setReconciler(ReactDOM)
428
428
  const { isNewBlended, isUseReact18 } = componentConfig
429
429
 
@@ -448,7 +448,7 @@ export function createNativeComponentConfig (
448
448
  const el = document.getElementById(compId)
449
449
 
450
450
  if (!el) {
451
- throw new Error(`没有找到组件实例。`)
451
+ throw new Error('没有找到组件实例。')
452
452
  } else {
453
453
  el.ctx = this
454
454
  cb && cb(el)
@@ -0,0 +1,13 @@
1
+ import type { PageConfig } from '@tarojs/taro';
2
+ export declare function injectPageInstance(inst: any, id: string): void;
3
+ export declare function getPageInstance(id: string): any;
4
+ export declare function removePageInstance(id: string): void;
5
+ export declare function safeExecute(path: string, lifecycle: string, ...args: unknown[]): any;
6
+ export declare function stringify(obj?: Record<string, unknown>): string;
7
+ export declare function getPath(id: string, options?: Record<string, unknown>): string;
8
+ export declare function getOnReadyEventKey(path: string): string;
9
+ export declare function getOnShowEventKey(path: string): string;
10
+ export declare function getOnHideEventKey(path: string): string;
11
+ export declare function createPageConfig(component: any, pageName?: string, pageConfig?: PageConfig): {
12
+ [x: string]: (options?: Readonly<Record<string, unknown>>, cb?: (...args: any[]) => any) => void;
13
+ };
@@ -0,0 +1,7 @@
1
+ export * from './is';
2
+ export { noop } from '@tarojs/shared';
3
+ export declare function capitalize(s: string): string;
4
+ export declare const incrementId: (init?: number) => () => number;
5
+ export declare function ensureIsArray<T>(item: T | T[]): T[];
6
+ export declare const EMPTY_OBJ: any;
7
+ export declare const HOOKS_APP_ID = "taro-app";
@@ -0,0 +1,10 @@
1
+ export declare function isClassComponent(R: any, component: any): boolean;
2
+ export declare function isString(o: unknown): o is string;
3
+ export declare function isUndefined(o: unknown): o is undefined;
4
+ export declare function isNull(o: unknown): o is null;
5
+ export declare function isObject<T>(o: unknown): o is T;
6
+ export declare function isBoolean(o: unknown): o is boolean;
7
+ export declare function isFunction(o: unknown): o is (...args: any[]) => any;
8
+ export declare function isNumber(o: unknown): o is number;
9
+ export declare function isBooleanStringLiteral(o: unknown): o is string;
10
+ export declare const isArray: (arg: any) => arg is any[];
@@ -0,0 +1,10 @@
1
+ /// <reference types="types/runtime" />
2
+ import type { AppInstance } from '@tarojs/runtime';
3
+ import type { AppConfig } from '@tarojs/taro';
4
+ import type { SolidComponent } from './connect';
5
+ export declare const ReactMeta: {
6
+ R: any;
7
+ Container: any;
8
+ PageContext: any;
9
+ };
10
+ export declare function createSolidApp(App: SolidComponent, config: AppConfig): AppInstance;
@@ -0,0 +1,4 @@
1
+ /// <reference types="types/runtime" />
2
+ import type { TaroNode } from '@tarojs/runtime';
3
+ export type SolidComponent = (props?: any) => TaroNode;
4
+ export declare function setReconciler(): void;
@@ -0,0 +1,5 @@
1
+ export declare const ON_SHOW = "onShow";
2
+ export declare const ON_HIDE = "onHide";
3
+ export declare const ON_LOAD = "onLoad";
4
+ export declare const ON_UNLOAD = "onUnload";
5
+ export declare const ON_READY = "onReady";
@@ -0,0 +1,31 @@
1
+ /// <reference types="types/runtime" />
2
+ import type { TFunc } from '@tarojs/runtime';
3
+ /** LifeCycle */
4
+ export declare const useDidHide: (fn: TFunc) => void;
5
+ export declare const useDidShow: (fn: TFunc) => void;
6
+ /** App */
7
+ export declare const useError: (fn: TFunc) => void;
8
+ export declare const useUnhandledRejection: (fn: TFunc) => void;
9
+ export declare const useLaunch: (fn: TFunc) => void;
10
+ export declare const usePageNotFound: (fn: TFunc) => void;
11
+ /** Page */
12
+ export declare const useLoad: (fn: TFunc) => void;
13
+ export declare const usePageScroll: (fn: TFunc) => void;
14
+ export declare const usePullDownRefresh: (fn: TFunc) => void;
15
+ export declare const usePullIntercept: (fn: TFunc) => void;
16
+ export declare const useReachBottom: (fn: TFunc) => void;
17
+ export declare const useResize: (fn: TFunc) => void;
18
+ export declare const useUnload: (fn: TFunc) => void;
19
+ /** Mini-Program */
20
+ export declare const useAddToFavorites: (fn: TFunc) => void;
21
+ export declare const useOptionMenuClick: (fn: TFunc) => void;
22
+ export declare const useKeyboardHeight: (fn: TFunc) => void;
23
+ export declare const useSaveExitState: (fn: TFunc) => void;
24
+ export declare const useShareAppMessage: (fn: TFunc) => void;
25
+ export declare const useShareTimeline: (fn: TFunc) => void;
26
+ export declare const useTitleClick: (fn: TFunc) => void;
27
+ /** Router */
28
+ export declare const useReady: (fn: TFunc) => void;
29
+ export declare const useRouter: (dynamic?: boolean) => import("@tarojs/runtime/dist/current").Router | import("solid-js").Accessor<import("@tarojs/runtime/dist/current").Router | null> | null;
30
+ export declare const useTabItemTap: (fn: TFunc) => void;
31
+ export declare const useScope: () => undefined;
@@ -78,6 +78,7 @@ export const useUnload = createTaroHook('onUnload')
78
78
  /** Mini-Program */
79
79
  export const useAddToFavorites = createTaroHook('onAddToFavorites')
80
80
  export const useOptionMenuClick = createTaroHook('onOptionMenuClick')
81
+ export const useKeyboardHeight = createTaroHook('onKeyboardHeight')
81
82
  export const useSaveExitState = createTaroHook('onSaveExitState')
82
83
  export const useShareAppMessage = createTaroHook('onShareAppMessage')
83
84
  export const useShareTimeline = createTaroHook('onShareTimeline')
@@ -0,0 +1,4 @@
1
+ export * from './app';
2
+ export * from './connect';
3
+ export * from './hooks';
4
+ export * from './page';
@@ -0,0 +1,13 @@
1
+ import type { PageConfig } from '@tarojs/taro';
2
+ export declare function injectPageInstance(inst: any, id: string): void;
3
+ export declare function getPageInstance(id: string): any;
4
+ export declare function removePageInstance(id: string): void;
5
+ export declare function safeExecute(path: string, lifecycle: string, ...args: unknown[]): any;
6
+ export declare function stringify(obj?: Record<string, unknown>): string;
7
+ export declare function getPath(id: string, options?: Record<string, unknown>): string;
8
+ export declare function getOnReadyEventKey(path: string): string;
9
+ export declare function getOnShowEventKey(path: string): string;
10
+ export declare function getOnHideEventKey(path: string): string;
11
+ export declare function createPageConfig(component: any, pageName?: string, pageConfig?: PageConfig): {
12
+ [x: string]: (options?: Readonly<Record<string, unknown>>, cb?: (...args: any[]) => any) => void;
13
+ };
@@ -0,0 +1,8 @@
1
+ /// <reference types="types/runtime" />
2
+ import { TaroNode } from '@tarojs/runtime';
3
+ import type { Accessor } from 'solid-js';
4
+ import type { ResolvedChildren } from 'solid-js/types/reactive/signal';
5
+ export type Component = (props?: any) => TaroNode;
6
+ type Children = undefined | string | number | TaroNode | TaroNode[] | Component | Component[] | Accessor<ResolvedChildren> | (() => Component[]);
7
+ export declare function h(tagName: string, props?: any, children?: Children): TaroNode;
8
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './h';
2
+ export * from './render';
3
+ export * from './use';
@@ -0,0 +1,7 @@
1
+ /// <reference types="types/runtime" />
2
+ import type { TaroElement } from '@tarojs/runtime';
3
+ export type Props = Record<string, unknown>;
4
+ export declare function updateProps(dom: TaroElement, oldProps: Props, newProps: Props): void;
5
+ export declare function updatePropsByPayload(dom: TaroElement, oldProps: Props, updatePayload: any[]): void;
6
+ export declare function getUpdatePayload(dom: TaroElement, oldProps: Props, newProps: Props): any[] | null;
7
+ export declare function setProperty(dom: TaroElement, name: string, value: unknown, oldValue?: unknown): void;
@@ -5,7 +5,7 @@ import type { Style, TaroElement } from '@tarojs/runtime'
5
5
 
6
6
  export type Props = Record<string, unknown>
7
7
 
8
- const IS_NON_DIMENSIONAL = /max|aspect|acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i
8
+ const IS_NON_DIMENSIONAL = /aspect|acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i
9
9
 
10
10
  function isEventName (s: string) {
11
11
  return s[0] === 'o' && s[1] === 'n'
@@ -0,0 +1,16 @@
1
+ /// <reference types="types/runtime" />
2
+ import type { TaroNode } from '@tarojs/runtime';
3
+ export declare const render: (code: () => TaroNode, node: TaroNode) => () => void;
4
+ export declare const effect: <T>(fn: (prev?: T | undefined) => T, init?: T | undefined) => void;
5
+ export declare const memo: <T>(fn: () => T, equal: boolean) => () => T;
6
+ export declare const createComponent: (type: any, props?: any) => TaroNode;
7
+ export declare const createElement: (tag: string) => TaroNode;
8
+ export declare const createTextNode: (value: string) => TaroNode;
9
+ export declare const insertNode: (parent: TaroNode, node: TaroNode, anchor?: TaroNode | undefined) => void;
10
+ export declare const insert: <T>(parent: any, accessor: T | (() => T), marker?: any) => TaroNode;
11
+ export declare const spread: <T>(node: any, accessor: T | (() => T), skipChildren?: Boolean | undefined) => void;
12
+ export declare const setProp: <T>(node: TaroNode, name: string, value: T, prev?: T | undefined) => T;
13
+ export declare const mergeProps: (...sources: unknown[]) => unknown;
14
+ declare function Fragment(props: any): any;
15
+ declare function jsx(type: any, props: any): TaroNode;
16
+ export { Fragment, jsx, jsx as jsxDEV, jsx as jsxs };
@@ -0,0 +1 @@
1
+ export declare function use(fn: any, ele: any, accessor: any): void;
@@ -0,0 +1,16 @@
1
+ export * from './is';
2
+ export declare const noop: (..._: unknown[]) => void;
3
+ export declare function capitalize(s: string): string;
4
+ export declare const incrementId: (init?: number) => () => number;
5
+ export declare const EMPTY_OBJ: any;
6
+ export declare const HOOKS_APP_ID = "taro-app";
7
+ export declare function ensureIsArray<T>(item: T | T[]): T[];
8
+ /**
9
+ * set writable, enumerable to true
10
+ */
11
+ export declare function setDefaultDescriptor(obj: Record<string, any>): Record<string, any>;
12
+ /**
13
+ * 设置入口的路由参数
14
+ * @param options 小程序传入的参数
15
+ */
16
+ export declare function setRouterParams(options: any): void;
@@ -0,0 +1,10 @@
1
+ export declare function isClassComponent(R: any, component: any): boolean;
2
+ export declare function isString(o: unknown): o is string;
3
+ export declare function isUndefined(o: unknown): o is undefined;
4
+ export declare function isNull(o: unknown): o is null;
5
+ export declare function isObject<T>(o: unknown): o is T;
6
+ export declare function isBoolean(o: unknown): o is boolean;
7
+ export declare function isFunction(o: unknown): o is (...args: any[]) => any;
8
+ export declare function isNumber(o: unknown): o is number;
9
+ export declare function isBooleanStringLiteral(o: unknown): o is string;
10
+ export declare const isArray: (arg: any) => arg is any[];