vite-plugin-taro-runtime 0.7.1-beta.1 → 0.7.1

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/README.md CHANGED
@@ -12,7 +12,7 @@ The package build consumes pinned development dependencies for Taro's runtime, g
12
12
 
13
13
  Output directories and exports mirror the upstream Taro package names (`runtime`, `api`, `taro`, `components`, `router`, `taro-h5`, `react`, `plugin-framework-react`, and each `plugin-platform-*` package). The upstream ESM runtime graph is copied unchanged while the unexported CommonJS duplicate is omitted. Its entries are exposed through the explicit `runtime/mini` and `runtime/h5` export names. Application builds therefore load only the selected package entry and retain normal Rolldown tree-shaking.
14
14
 
15
- The `api`, `taro`, `components`, `router`, and `taro-h5` directories retain the runtime files and declarations used by VPT. Alternate bundles and the components' unused lazy-loader JavaScript are omitted. The generic Taro facade retains its CommonJS package boundary. Copied declarations redirect imports and module augmentations to this package's type exports, so consumer type checking does not depend on Vite aliases or upstream development dependencies. CSS remains side-effectful, and required third-party runtime dependencies are declared directly. None of these upstream Taro packages—and therefore none of their `@tarojs/helper` compiler dependencies—are installed in consumer projects.
15
+ The `api`, `taro`, `components`, `router`, and `taro-h5` directories retain the runtime files and declarations used by VPT. Alternate bundles and the components' unused lazy-loader JavaScript are omitted. The generic Taro facade retains its CommonJS package boundary, shared mutable API object, and bulk native initialization. VPT's Mini facade attaches framework hooks to that same object; it does not generate a separate API inventory or promise per-API tree-shaking. H5 instead uses a read-only ESM namespace over its modular APIs and static framework hooks. The framework runtime retains Taro's original hook registration, so hooks remain grouped rather than being individually tree-shaken. Copied declarations redirect imports and module augmentations to this package's type exports, so consumer type checking does not depend on Vite aliases or upstream development dependencies. CSS remains side-effectful, and required third-party runtime dependencies are declared directly. None of these upstream Taro packages—and therefore none of their `@tarojs/helper` compiler dependencies—are installed in consumer projects.
16
16
 
17
17
  ## Development
18
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-taro-runtime",
3
- "version": "0.7.1-beta.1",
3
+ "version": "0.7.1",
4
4
  "description": "Taro runtime, React, and platform support for vite-plugin-taro.",
5
5
  "author": "sep2",
6
6
  "license": "MIT",
@@ -66,7 +66,6 @@
66
66
  "default": "./dist/react/react.esm.js"
67
67
  },
68
68
  "./plugin-framework-react/runtime": "./dist/plugin-framework-react/runtime.js",
69
- "./plugin-framework-react/api-loader": "./dist/plugin-framework-react/api-loader.cjs",
70
69
  "./plugin-platform-weapp/runtime": "./dist/plugin-platform-weapp/runtime.js",
71
70
  "./plugin-platform-weapp/components-react": {
72
71
  "types": "./dist/plugin-platform-weapp/types/components-react.d.ts",
@@ -129,7 +128,6 @@
129
128
  "@tarojs/shared": "4.2.1",
130
129
  "abortcontroller-polyfill": "^1.7.5",
131
130
  "base64-js": "^1.5.1",
132
- "dingtalk-jsapi": "~2.15.2",
133
131
  "hammerjs": "^2.0.8",
134
132
  "history": "^5.3.0",
135
133
  "hls.js": "^1.1.5",
@@ -1,87 +0,0 @@
1
- 'use strict';
2
-
3
- function apiLoader (str) {
4
- return `import {
5
- useAddToFavorites,
6
- useDidHide,
7
- useDidShow,
8
- useError,
9
- useLaunch,
10
- useLoad,
11
- useOptionMenuClick,
12
- useKeyboardHeight,
13
- usePageNotFound,
14
- usePageScroll,
15
- usePullDownRefresh,
16
- usePullIntercept,
17
- useReachBottom,
18
- useReady,
19
- useResize,
20
- useRouter,
21
- useSaveExitState,
22
- useShareAppMessage,
23
- useShareTimeline,
24
- useTabItemTap,
25
- useTitleClick,
26
- useScope,
27
- useUnhandledRejection,
28
- useUnload
29
- } from '@tarojs/plugin-framework-react/dist/runtime'
30
- ${str}
31
-
32
- taro.useAddToFavorites = useAddToFavorites
33
- taro.useDidHide = useDidHide
34
- taro.useDidShow = useDidShow
35
- taro.useError = useError
36
- taro.useLaunch = useLaunch
37
- taro.useLoad = useLoad
38
- taro.useOptionMenuClick = useOptionMenuClick
39
- taro.useKeyboardHeight = useKeyboardHeight
40
- taro.usePageNotFound = usePageNotFound
41
- taro.usePageScroll = usePageScroll
42
- taro.usePullDownRefresh = usePullDownRefresh
43
- taro.usePullIntercept = usePullIntercept
44
- taro.useReachBottom = useReachBottom
45
- taro.useReady = useReady
46
- taro.useResize = useResize
47
- taro.useRouter = useRouter
48
- taro.useSaveExitState = useSaveExitState
49
- taro.useShareAppMessage = useShareAppMessage
50
- taro.useShareTimeline = useShareTimeline
51
- taro.useTabItemTap = useTabItemTap
52
- taro.useTitleClick = useTitleClick
53
- taro.useScope = useScope
54
- taro.useUnhandledRejection = useUnhandledRejection
55
- taro.useUnload = useUnload
56
-
57
- export {
58
- useAddToFavorites,
59
- useDidHide,
60
- useDidShow,
61
- useError,
62
- useLaunch,
63
- useLoad,
64
- useOptionMenuClick,
65
- useKeyboardHeight,
66
- usePageNotFound,
67
- usePageScroll,
68
- usePullDownRefresh,
69
- usePullIntercept,
70
- useReachBottom,
71
- useReady,
72
- useResize,
73
- useRouter,
74
- useSaveExitState,
75
- useShareAppMessage,
76
- useShareTimeline,
77
- useTabItemTap,
78
- useTitleClick,
79
- useScope,
80
- useUnhandledRejection,
81
- useUnload
82
- }
83
- `;
84
- }
85
-
86
- module.exports = apiLoader;
87
- //# sourceMappingURL=api-loader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-loader.js","sources":["../src/api-loader.ts"],"sourcesContent":["export default function (str: string) {\n return `import {\n useAddToFavorites,\n useDidHide,\n useDidShow,\n useError,\n useLaunch,\n useLoad,\n useOptionMenuClick,\n useKeyboardHeight,\n usePageNotFound,\n usePageScroll,\n usePullDownRefresh,\n usePullIntercept,\n useReachBottom,\n useReady,\n useResize,\n useRouter,\n useSaveExitState,\n useShareAppMessage,\n useShareTimeline,\n useTabItemTap,\n useTitleClick,\n useScope,\n useUnhandledRejection,\n useUnload\n} from '@tarojs/plugin-framework-react/dist/runtime'\n${str}\n\ntaro.useAddToFavorites = useAddToFavorites\ntaro.useDidHide = useDidHide\ntaro.useDidShow = useDidShow\ntaro.useError = useError\ntaro.useLaunch = useLaunch\ntaro.useLoad = useLoad\ntaro.useOptionMenuClick = useOptionMenuClick\ntaro.useKeyboardHeight = useKeyboardHeight\ntaro.usePageNotFound = usePageNotFound\ntaro.usePageScroll = usePageScroll\ntaro.usePullDownRefresh = usePullDownRefresh\ntaro.usePullIntercept = usePullIntercept\ntaro.useReachBottom = useReachBottom\ntaro.useReady = useReady\ntaro.useResize = useResize\ntaro.useRouter = useRouter\ntaro.useSaveExitState = useSaveExitState\ntaro.useShareAppMessage = useShareAppMessage\ntaro.useShareTimeline = useShareTimeline\ntaro.useTabItemTap = useTabItemTap\ntaro.useTitleClick = useTitleClick\ntaro.useScope = useScope\ntaro.useUnhandledRejection = useUnhandledRejection\ntaro.useUnload = useUnload\n\nexport {\n useAddToFavorites,\n useDidHide,\n useDidShow,\n useError,\n useLaunch,\n useLoad,\n useOptionMenuClick,\n useKeyboardHeight,\n usePageNotFound,\n usePageScroll,\n usePullDownRefresh,\n usePullIntercept,\n useReachBottom,\n useReady,\n useResize,\n useRouter,\n useSaveExitState,\n useShareAppMessage,\n useShareTimeline,\n useTabItemTap,\n useTitleClick,\n useScope,\n useUnhandledRejection,\n useUnload\n}\n`\n}\n"],"names":[],"mappings":";;AAAc,kBAAA,EAAW,GAAW,EAAA;IAClC,OAAO,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BP,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqDJ;AACD;;;;"}