wevu 7.4.0 → 7.5.0

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 (227) hide show
  1. package/README.md +2 -0
  2. package/dist/dev/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/defineProperty.mjs +1 -1
  3. package/dist/dev/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/toPrimitive.mjs +1 -1
  4. package/dist/dev/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/toPropertyKey.mjs +1 -1
  5. package/dist/dev/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/typeof.mjs +1 -1
  6. package/dist/dev/package.mjs +1 -1
  7. package/dist/dev/reactivity/core.mjs +1 -1
  8. package/dist/dev/reactivity/ref.mjs +1 -1
  9. package/dist/dev/runtime/app/diagnostics.mjs +5 -1
  10. package/dist/dev/runtime/app/diagnostics.mjs.map +1 -1
  11. package/dist/dev/runtime/app/mount.mjs +8 -3
  12. package/dist/dev/runtime/app/mount.mjs.map +1 -1
  13. package/dist/dev/runtime/app/setData/commitTracker.mjs +39 -4
  14. package/dist/dev/runtime/app/setData/commitTracker.mjs.map +1 -1
  15. package/dist/dev/runtime/app/setData/observation.mjs +109 -0
  16. package/dist/dev/runtime/app/setData/observation.mjs.map +1 -0
  17. package/dist/dev/runtime/app/setData/scheduler.mjs +12 -1
  18. package/dist/dev/runtime/app/setData/scheduler.mjs.map +1 -1
  19. package/dist/dev/runtime/app/setDataOptions.mjs +1 -0
  20. package/dist/dev/runtime/app/setDataOptions.mjs.map +1 -1
  21. package/dist/dev/runtime/define/initialComputed.mjs +13 -12
  22. package/dist/dev/runtime/define/initialComputed.mjs.map +1 -1
  23. package/dist/dev/runtime/define/props.mjs +5 -1
  24. package/dist/dev/runtime/define/props.mjs.map +1 -1
  25. package/dist/dev/runtime/define/scopedSlotOptions.mjs +2 -1
  26. package/dist/dev/runtime/define/scopedSlotOptions.mjs.map +1 -1
  27. package/dist/dev/runtime/define.mjs +1 -1
  28. package/dist/dev/runtime/define.mjs.map +1 -1
  29. package/dist/dev/runtime/features/scopedSlots.mjs.map +1 -1
  30. package/dist/dev/runtime/register/component/props.mjs +14 -4
  31. package/dist/dev/runtime/register/component/props.mjs.map +1 -1
  32. package/dist/dev/runtime/register/component/registerDefinition.mjs +27 -17
  33. package/dist/dev/runtime/register/component/registerDefinition.mjs.map +1 -1
  34. package/dist/dev/runtime/register/component.mjs +2 -1
  35. package/dist/dev/runtime/register/component.mjs.map +1 -1
  36. package/dist/dev/runtime/register/runtimeInstance/methodBridge.mjs +14 -7
  37. package/dist/dev/runtime/register/runtimeInstance/methodBridge.mjs.map +1 -1
  38. package/dist/dev/runtime/register/runtimeInstance/nativeDeclaration.mjs +78 -0
  39. package/dist/dev/runtime/register/runtimeInstance/nativeDeclaration.mjs.map +1 -0
  40. package/dist/dev/runtime/register/runtimeInstance/provideContext.mjs +52 -8
  41. package/dist/dev/runtime/register/runtimeInstance/provideContext.mjs.map +1 -1
  42. package/dist/dev/runtime/register/runtimeInstance/utils.mjs.map +1 -1
  43. package/dist/dev/runtime/register/runtimeInstance.mjs +60 -19
  44. package/dist/dev/runtime/register/runtimeInstance.mjs.map +1 -1
  45. package/dist/fetch.mjs +1 -1
  46. package/dist/internal-template.mjs +1 -1
  47. package/dist/package.mjs +1 -1
  48. package/dist/reactivity/core.mjs +1 -1
  49. package/dist/reactivity/reactive/patch.mjs +1 -1
  50. package/dist/reactivity/reactive/patchState.mjs +1 -1
  51. package/dist/reactivity/ref.mjs +1 -1
  52. package/dist/reactivity/watch/helpers.mjs +1 -1
  53. package/dist/router/initialNavigation.mjs +1 -1
  54. package/dist/router/useRoute.mjs +1 -1
  55. package/dist/routerInternal/matching.mjs +1 -1
  56. package/dist/routerInternal/params.mjs +1 -1
  57. package/dist/routerInternal/path.mjs +1 -1
  58. package/dist/routerInternal/query.mjs +1 -1
  59. package/dist/routerInternal/records.mjs +1 -1
  60. package/dist/runtime/app/context.mjs +1 -1
  61. package/dist/runtime/app/diagnostics.mjs +1 -1
  62. package/dist/runtime/app/mount.mjs +1 -1
  63. package/dist/runtime/app/setData/commitTracker.d.mts +2 -1
  64. package/dist/runtime/app/setData/commitTracker.mjs +1 -1
  65. package/dist/runtime/app/setData/observation.d.mts +12 -0
  66. package/dist/runtime/app/setData/observation.mjs +1 -0
  67. package/dist/runtime/app/setData/scheduler.d.mts +1 -0
  68. package/dist/runtime/app/setData/scheduler.mjs +1 -1
  69. package/dist/runtime/app/setDataOptions.mjs +1 -1
  70. package/dist/runtime/define/initialComputed.mjs +1 -1
  71. package/dist/runtime/define/props.mjs +1 -1
  72. package/dist/runtime/define/scopedSlotOptions.mjs +1 -1
  73. package/dist/runtime/define.mjs +1 -1
  74. package/dist/runtime/diff.mjs +1 -1
  75. package/dist/runtime/features/publicLayout.mjs +1 -1
  76. package/dist/runtime/features/scopedSlots.d.mts +2 -1
  77. package/dist/runtime/jsxIsland.mjs +1 -1
  78. package/dist/runtime/pageLayout.mjs +1 -1
  79. package/dist/runtime/pageScroll.mjs +1 -1
  80. package/dist/runtime/register/component/alipayRegistration.mjs +1 -1
  81. package/dist/runtime/register/component/lifecycle.mjs +1 -1
  82. package/dist/runtime/register/component/props.mjs +1 -1
  83. package/dist/runtime/register/component/registerDefinition.mjs +1 -1
  84. package/dist/runtime/register/component/registerNativeDefinition.mjs +1 -1
  85. package/dist/runtime/register/component.mjs +1 -1
  86. package/dist/runtime/register/runtimeInstance/methodBridge.mjs +1 -1
  87. package/dist/runtime/register/runtimeInstance/nativeDeclaration.mjs +1 -0
  88. package/dist/runtime/register/runtimeInstance/provideContext.mjs +1 -1
  89. package/dist/runtime/register/runtimeInstance.d.mts +8 -4
  90. package/dist/runtime/register/runtimeInstance.mjs +1 -1
  91. package/dist/runtime/setupTracking.mjs +1 -1
  92. package/dist/runtime/templateRefs.mjs +1 -1
  93. package/dist/runtime/types/runtime.d.mts +1 -0
  94. package/dist/runtime/types/setData.d.mts +30 -0
  95. package/dist/scheduler.mjs +1 -1
  96. package/dist/web-apis.mjs +1 -1
  97. package/package.json +10 -9
  98. package/dist/dev/api/vitest/setup.d.mts +0 -1
  99. package/dist/dev/api/vitest.d.mts +0 -1
  100. package/dist/dev/api.d.mts +0 -1
  101. package/dist/dev/compiler.d.mts +0 -1
  102. package/dist/dev/fetch.d.mts +0 -9
  103. package/dist/dev/index.d.mts +0 -72
  104. package/dist/dev/internal-reactivity.d.mts +0 -18
  105. package/dist/dev/internal-runtime.d.mts +0 -45
  106. package/dist/dev/internal-template.d.mts +0 -2
  107. package/dist/dev/jsxTypes.d.mts +0 -9
  108. package/dist/dev/macros/shared.d.mts +0 -83
  109. package/dist/dev/macros.d.mts +0 -71
  110. package/dist/dev/reactivity/asyncDerivation.d.mts +0 -41
  111. package/dist/dev/reactivity/computed.d.mts +0 -25
  112. package/dist/dev/reactivity/core.d.mts +0 -35
  113. package/dist/dev/reactivity/index.d.mts +0 -16
  114. package/dist/dev/reactivity/reactive/mutation.d.mts +0 -21
  115. package/dist/dev/reactivity/reactive/patch.d.mts +0 -18
  116. package/dist/dev/reactivity/reactive/shallow.d.mts +0 -22
  117. package/dist/dev/reactivity/reactive/shared.d.mts +0 -4
  118. package/dist/dev/reactivity/reactive.d.mts +0 -42
  119. package/dist/dev/reactivity/readonly.d.mts +0 -27
  120. package/dist/dev/reactivity/ref.d.mts +0 -27
  121. package/dist/dev/reactivity/shallowRef.d.mts +0 -19
  122. package/dist/dev/reactivity/toRefs.d.mts +0 -43
  123. package/dist/dev/reactivity/traverse.d.mts +0 -8
  124. package/dist/dev/reactivity/watch/types.d.mts +0 -43
  125. package/dist/dev/reactivity/watch.d.mts +0 -22
  126. package/dist/dev/router/auto-routes.d.mts +0 -8
  127. package/dist/dev/router/createRouter.d.mts +0 -9
  128. package/dist/dev/router/navigationCore.d.mts +0 -7
  129. package/dist/dev/router/resolve.d.mts +0 -7
  130. package/dist/dev/router/routeSync.d.mts +0 -2
  131. package/dist/dev/router/scrollRestoration/adapters.d.mts +0 -8
  132. package/dist/dev/router/scrollRestoration/controller.d.mts +0 -8
  133. package/dist/dev/router/scrollRestoration/host.d.mts +0 -3
  134. package/dist/dev/router/scrollRestoration/index.d.mts +0 -9
  135. package/dist/dev/router/scrollRestoration/types.d.mts +0 -61
  136. package/dist/dev/router/types.d.mts +0 -267
  137. package/dist/dev/router/useRoute.d.mts +0 -20
  138. package/dist/dev/router/useRouter.d.mts +0 -9
  139. package/dist/dev/router.d.mts +0 -30
  140. package/dist/dev/routerInternal/location.d.mts +0 -2
  141. package/dist/dev/routerInternal/matching.d.mts +0 -2
  142. package/dist/dev/routerInternal/params.d.mts +0 -2
  143. package/dist/dev/routerInternal/query.d.mts +0 -7
  144. package/dist/dev/routerInternal/records.d.mts +0 -2
  145. package/dist/dev/routerInternal/recordsWarnings.d.mts +0 -2
  146. package/dist/dev/routerInternal/shared.d.mts +0 -9
  147. package/dist/dev/routerInternal/snapshots.d.mts +0 -2
  148. package/dist/dev/routerInternal/types.d.mts +0 -9
  149. package/dist/dev/runtime/app/pending.d.mts +0 -10
  150. package/dist/dev/runtime/app/setData/commitTracker.d.mts +0 -13
  151. package/dist/dev/runtime/app/setData/scheduler.d.mts +0 -51
  152. package/dist/dev/runtime/app.d.mts +0 -8
  153. package/dist/dev/runtime/capabilities.d.mts +0 -78
  154. package/dist/dev/runtime/css.d.mts +0 -14
  155. package/dist/dev/runtime/defaults.d.mts +0 -12
  156. package/dist/dev/runtime/define.d.mts +0 -118
  157. package/dist/dev/runtime/disposables.d.mts +0 -31
  158. package/dist/dev/runtime/elementIntersectionObserver.d.mts +0 -26
  159. package/dist/dev/runtime/features/inlineEvents.d.mts +0 -7
  160. package/dist/dev/runtime/features/jsxIslands.d.mts +0 -7
  161. package/dist/dev/runtime/features/layout.d.mts +0 -7
  162. package/dist/dev/runtime/features/patchStrategy.d.mts +0 -7
  163. package/dist/dev/runtime/features/publicLayout.d.mts +0 -24
  164. package/dist/dev/runtime/features/scopedSlots.d.mts +0 -23
  165. package/dist/dev/runtime/features/setDataHighFrequencyWarning.d.mts +0 -7
  166. package/dist/dev/runtime/features/templateRefs.d.mts +0 -7
  167. package/dist/dev/runtime/hooks/base.d.mts +0 -27
  168. package/dist/dev/runtime/hooks/register.d.mts +0 -30
  169. package/dist/dev/runtime/hooks/vue.d.mts +0 -52
  170. package/dist/dev/runtime/hooks.d.mts +0 -4
  171. package/dist/dev/runtime/index.d.mts +0 -46
  172. package/dist/dev/runtime/intersectionObserver.d.mts +0 -14
  173. package/dist/dev/runtime/jsxIsland.d.mts +0 -37
  174. package/dist/dev/runtime/layoutBridge.d.mts +0 -55
  175. package/dist/dev/runtime/noSetData.d.mts +0 -5
  176. package/dist/dev/runtime/pageEnvironment.d.mts +0 -50
  177. package/dist/dev/runtime/pageLayout.d.mts +0 -25
  178. package/dist/dev/runtime/pageScroll.d.mts +0 -29
  179. package/dist/dev/runtime/provide.d.mts +0 -60
  180. package/dist/dev/runtime/provideStore.d.mts +0 -7
  181. package/dist/dev/runtime/publicRuntime.d.mts +0 -22
  182. package/dist/dev/runtime/pullDownRefresh.d.mts +0 -12
  183. package/dist/dev/runtime/register/app.d.mts +0 -14
  184. package/dist/dev/runtime/register/component.d.mts +0 -17
  185. package/dist/dev/runtime/register/inline.d.mts +0 -15
  186. package/dist/dev/runtime/register/runtimeInstance.d.mts +0 -26
  187. package/dist/dev/runtime/register/setup.d.mts +0 -11
  188. package/dist/dev/runtime/register/watch.d.mts +0 -12
  189. package/dist/dev/runtime/register.d.mts +0 -5
  190. package/dist/dev/runtime/selectorQuery.d.mts +0 -54
  191. package/dist/dev/runtime/template.d.mts +0 -6
  192. package/dist/dev/runtime/templateRefTypes.d.mts +0 -12
  193. package/dist/dev/runtime/types/core.d.mts +0 -35
  194. package/dist/dev/runtime/types/miniprogram.d.mts +0 -84
  195. package/dist/dev/runtime/types/miniprogramHost.d.mts +0 -45
  196. package/dist/dev/runtime/types/miniprogramHostSources.d.mts +0 -112
  197. package/dist/dev/runtime/types/options.d.mts +0 -138
  198. package/dist/dev/runtime/types/props/propTypes.d.mts +0 -79
  199. package/dist/dev/runtime/types/props/router.d.mts +0 -51
  200. package/dist/dev/runtime/types/props/setup.d.mts +0 -96
  201. package/dist/dev/runtime/types/props.d.mts +0 -4
  202. package/dist/dev/runtime/types/runtime.d.mts +0 -59
  203. package/dist/dev/runtime/types/setData.d.mts +0 -237
  204. package/dist/dev/runtime/types.d.mts +0 -29
  205. package/dist/dev/runtime/uniAppHost.d.mts +0 -8
  206. package/dist/dev/runtime/updatePerformance.d.mts +0 -13
  207. package/dist/dev/runtime/use.d.mts +0 -13
  208. package/dist/dev/runtime/vueCompat/context.d.mts +0 -8
  209. package/dist/dev/runtime/vueCompat/model.d.mts +0 -30
  210. package/dist/dev/runtime/vueCompat/router.d.mts +0 -29
  211. package/dist/dev/runtime/vueCompat/templateRef.d.mts +0 -9
  212. package/dist/dev/runtime/vueCompat.d.mts +0 -5
  213. package/dist/dev/scheduler.d.mts +0 -4
  214. package/dist/dev/store/define.d.mts +0 -8
  215. package/dist/dev/store/manager.d.mts +0 -16
  216. package/dist/dev/store/storeToRefs.d.mts +0 -11
  217. package/dist/dev/store/types.d.mts +0 -106
  218. package/dist/dev/store.d.mts +0 -5
  219. package/dist/dev/version.d.mts +0 -4
  220. package/dist/dev/vue-augment.d.mts +0 -8
  221. package/dist/dev/vue-demi.d.mts +0 -87
  222. package/dist/dev/vue-types.d.mts +0 -19
  223. package/dist/dev/web-apis.d.mts +0 -3
  224. /package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/defineProperty.mjs +0 -0
  225. /package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/toPrimitive.mjs +0 -0
  226. /package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/toPropertyKey.mjs +0 -0
  227. /package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/typeof.mjs +0 -0
@@ -132,6 +132,12 @@ export interface SetDataSnapshotOptions {
132
132
  * setData 调试信息回调(用于观测 patch 命中率/回退原因/payload 大小)。
133
133
  */
134
134
  debug?: (info: SetDataDebugInfo) => void;
135
+ /**
136
+ * 通过 debug 回调额外观测 prepare、物理 dispatch 与提交结算,默认关闭。
137
+ * 按 revision 采样一次;同一次物理调用可关联多个 revision,按 dispatch.id 去重。
138
+ * callback / Promise / 同步返回均不等于可见视图完成;visibleAt 始终为 null。
139
+ */
140
+ debugPhases?: boolean;
135
141
  /**
136
142
  * 内建诊断日志开关(默认 off)。
137
143
  *
@@ -232,5 +238,29 @@ export interface SetDataDebugInfo {
232
238
  bindings?: SetDataBindingDiagnostic[];
233
239
  revision?: number;
234
240
  committedRevision?: number;
241
+ /** 阶段观测;仅在显式开启 debugPhases 时提供。 */
242
+ phase?: {
243
+ version: 1;
244
+ observerId: number;
245
+ name: 'prepare' | 'dispatch' | 'commit';
246
+ result: 'prepared' | 'pending' | 'committed' | 'failed' | 'abandoned' | 'disposed' | 'late-committed' | 'late-failed' | 'out-of-order';
247
+ completion: 'unknown' | 'callback' | 'promise' | 'return' | 'throw';
248
+ /** Date.now 毫秒时间;不可用或时钟倒退时,持续时间为 null。 */
249
+ prepareStartedAt: number | null;
250
+ preparedAt: number;
251
+ prepareDurationMs: number | null;
252
+ settledAt: number | null;
253
+ commitDurationMs: number | null;
254
+ visibleAt: null;
255
+ /** 一个运行时模块实例内唯一的物理调用;缺失表示尚未下发或适配器无法观测。 */
256
+ dispatch: {
257
+ id: number;
258
+ startedAt: number;
259
+ returnedAt: number | null;
260
+ durationMs: number | null;
261
+ /** JSON 载荷 UTF-8 字节数;不含宿主协议封装,序列化失败时为 null。 */
262
+ payloadBytes: number | null;
263
+ } | null;
264
+ };
235
265
  }
236
266
  //#endregion
@@ -1 +1 @@
1
- const e=Promise.resolve(),t=/* @__PURE__ */ new Set,n=/* @__PURE__ */ new Set;let r=!1,i=!1,a,o;function s(){i=!1,r=!0,a=/* @__PURE__ */ new Set;let e=!1,o=!1,c,l=[];try{t.forEach(e=>{a?.add(e);try{let t=e();t&&typeof t.then==`function`&&l.push(t)}catch(e){o||(o=!0,c=e)}})}finally{t.clear(),a=void 0,r=!1,n.size&&(n.forEach(e=>t.add(e)),n.clear(),i=!0,e=!0)}if(l.length||e)return Promise.all(l).then(()=>e?s():void 0).then(()=>{if(o)throw c},e=>{throw o?c:e});if(o)throw c}function c(){let t=e.then(s);o=t;let n=()=>{o===t&&(o=void 0)};t.then(n,n)}function l(e){if(r&&a?.has(e)){n.add(e);return}t.add(e),!r&&!i&&(i=!0,c())}function u(t){let n=o??e;return t?n.then(t):n}export{u as nextTick,l as queueJob};
1
+ const e=Promise.resolve(),t=/* @__PURE__ */ new Set,n=/* @__PURE__ */ new Set;let r=!1,i=!1,a,o;function s(){i=!1,r=!0,a=/* @__PURE__ */ new Set;let e=!1,o=!1,c,l=[];try{t.forEach(e=>{a?.add(e);try{let t=e();t&&typeof t.then==`function`&&l.push(t)}catch(e){o||(o=!0,c=e)}})}finally{t.clear(),a=void 0,r=!1,n.size&&(n.forEach(e=>t.add(e)),n.clear(),i=!0,e=!0)}if(l.length||e)return Promise.all(l).then(()=>e?s():void 0).then(()=>{if(o)throw c},e=>{throw o?c:e});if(o)throw c}function c(){let t=e.then(s);o=t;let n=()=>{o===t&&(o=void 0)};t.then(n,n)}function l(e){r&&a?.has(e)?n.add(e):(t.add(e),!r&&!i&&(i=!0,c()))}function u(t){let n=o??e;return t?n.then(t):n}export{u as nextTick,l as queueJob};
package/dist/web-apis.mjs CHANGED
@@ -1 +1 @@
1
- import{installRequestGlobals as e,installWebRuntimeGlobals as t}from"@wevu/web-apis";export*from"@wevu/web-apis";export{e as installRequestGlobals,t as installWebRuntimeGlobals};
1
+ export{installRequestGlobals,installWebRuntimeGlobals}from"@wevu/web-apis";export*from"@wevu/web-apis";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wevu",
3
3
  "type": "module",
4
- "version": "7.4.0",
4
+ "version": "7.5.0",
5
5
  "description": "Vue 3 风格的小程序运行时,包含响应式、diff+setData 与轻量状态管理",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -272,7 +272,7 @@
272
272
  "registry": "https://registry.npmjs.org"
273
273
  },
274
274
  "engines": {
275
- "node": "^20.19.0 || >=22.12.0"
275
+ "node": "^22.18.0 || ^24.11.0 || >=26.0.0"
276
276
  },
277
277
  "peerDependencies": {
278
278
  "miniprogram-api-typings": "^5.0.0",
@@ -291,12 +291,12 @@
291
291
  }
292
292
  },
293
293
  "dependencies": {
294
- "@weapp-core/constants": "0.3.0",
295
- "@weapp-core/shared": "3.2.7",
296
- "@weapp-core/types": "1.1.5",
297
- "@wevu/api": "0.3.7",
298
- "@wevu/compiler": "7.4.0",
299
- "@wevu/web-apis": "1.3.4",
294
+ "@weapp-core/constants": "0.3.1",
295
+ "@weapp-core/shared": "3.2.8",
296
+ "@weapp-core/types": "1.1.6",
297
+ "@wevu/api": "0.3.8",
298
+ "@wevu/compiler": "7.5.0",
299
+ "@wevu/web-apis": "1.3.5",
300
300
  "vue": "^3.5.43"
301
301
  },
302
302
  "devDependencies": {
@@ -308,7 +308,8 @@
308
308
  "build:types": "tsdown --dts",
309
309
  "test": "vitest run",
310
310
  "test:dev": "vitest",
311
- "test:types": "pnpm build:types && tsd --files \"test-d/**/*.test-d.{ts,tsx}\" && tsd --files \"test-d/router-named-map.test-types.ts\"",
311
+ "test:types": "pnpm build:types && pnpm run test:types:check",
312
+ "test:types:check": "tsd --files \"test-d/**/*.test-d.{ts,tsx}\" && tsd --files \"test-d/router-named-map.test-types.ts\"",
312
313
  "typecheck": "tsc --noEmit",
313
314
  "release": "pnpm publish",
314
315
  "lint": "eslint .",
@@ -1 +0,0 @@
1
- export {}
@@ -1 +0,0 @@
1
- export * from "@wevu/api/vitest";
@@ -1 +0,0 @@
1
- export * from "@wevu/api";
@@ -1 +0,0 @@
1
- export * from "@wevu/compiler";
@@ -1,9 +0,0 @@
1
- import { WeapiMiniProgramRequestMethod } from "@wevu/api";
2
- import { RequestGlobalsFetchInit as WevuFetchInit, fetch } from "@wevu/web-apis/fetch";
3
- //#region src/fetch.d.ts
4
- export type WevuFetchInput = Parameters<typeof import('@wevu/web-apis/fetch').fetch>[0];
5
- export type MiniProgramRequestMethod = WeapiMiniProgramRequestMethod;
6
- export type WxRequestMethod = MiniProgramRequestMethod;
7
- //#endregion
8
- export { type WevuFetchInit, fetch };
9
- //# sourceMappingURL=fetch.d.mts.map
@@ -1,72 +0,0 @@
1
- import { AlipayMiniProgramHostNamespace, AlipayMiniProgramHostSourceContract, DefaultMiniProgramHostNamespace, DefaultMiniProgramHostSourceContract, DouyinMiniProgramHostNamespace, DouyinMiniProgramHostSourceContract, MiniProgramHostNamespace, MiniProgramHostNamespaceBySource, MiniProgramHostSourceName, MiniProgramHostSourceRegistry, MiniProgramPlatformHostNamespaceBySource, MiniProgramPlatformHostSourceName, MiniProgramPlatformHostSourceRegistry, MiniProgramRuntimeHostNamespaceBySource, MiniProgramRuntimeHostSourceName, MiniProgramRuntimeHostSourceRegistry, TtMiniProgramHostNamespace, TtMiniProgramHostSourceContract, WechatMiniProgramHostNamespace, WechatMiniProgramHostSourceContract } from "./runtime/types/miniprogramHostSources.mjs";
2
- import { HostMiniProgramAddToFavoritesOption, HostMiniProgramAppOptions, HostMiniProgramAppTrivialInstance, HostMiniProgramBehaviorIdentifier, HostMiniProgramBoundingClientRectResult, HostMiniProgramComponentAllFullProperty, HostMiniProgramComponentAllProperty, HostMiniProgramComponentBehaviorOptions, HostMiniProgramComponentEmptyArray, HostMiniProgramComponentInstance, HostMiniProgramComponentMethodOption, HostMiniProgramComponentPropertyOption, HostMiniProgramComponentPropertyValue, HostMiniProgramComponentShortProperty, HostMiniProgramComponentTrivialInstance, HostMiniProgramComponentTrivialOption, HostMiniProgramIntersectionObserver, HostMiniProgramIntersectionObserverOptions, HostMiniProgramLaunchOptions, HostMiniProgramMemoryWarningResult, HostMiniProgramNavigateToOption, HostMiniProgramNodesRef, HostMiniProgramNodesRefFields, HostMiniProgramPageLifetime, HostMiniProgramPageNotFoundOptions, HostMiniProgramPageResizeOption, HostMiniProgramPageScrollOption, HostMiniProgramPageTrivialInstance, HostMiniProgramReLaunchOption, HostMiniProgramRedirectToOption, HostMiniProgramRouter, HostMiniProgramSaveExitState, HostMiniProgramScrollOffsetResult, HostMiniProgramSelectorQuery, HostMiniProgramShareAppMessageOption, HostMiniProgramSwitchTabOption, HostMiniProgramTabItemTapOption, HostMiniProgramThemeChangeResult, HostMiniProgramTriggerEventOptions, HostMiniProgramUnhandledRejectionResult } from "./runtime/types/miniprogramHost.mjs";
3
- import { MiniProgramAdapter, MiniProgramAppOptions, MiniProgramBehaviorIdentifier, MiniProgramComponentInstance, MiniProgramComponentOptions, MiniProgramComponentPropertyValue, MiniProgramComponentRawOptions, MiniProgramInstance, MiniProgramPageLifetimes } from "./runtime/types/miniprogram.mjs";
4
- import { ComponentPropsOptions, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InferNativePropType, InferNativeProps, InferPropType, InferProps, NativePropType, NativePropsOptions, NativeTypeHint, NativeTypedProperty, PropConstructor, PropOptions, PropType } from "./runtime/types/props/propTypes.mjs";
5
- import { MiniProgramRouterNavigateToOption, MiniProgramRouterReLaunchOption, MiniProgramRouterRedirectToOption, MiniProgramRouterSwitchTabOption, SetupContextRouter, WevuTypedRouterRouteMap } from "./runtime/types/props/router.mjs";
6
- import { AsyncDerivation, AsyncDerivationContext, AsyncDerivationState, AsyncDerivationStatus, UseAsyncDerivationOptions, useAsyncDerivation } from "./reactivity/asyncDerivation.mjs";
7
- import { CustomRefFactory, CustomRefOptions, CustomRefSource, MaybeRef, MaybeRefOrGetter, Ref, ShallowRef, customRef, isRef, ref, toValue, unref } from "./reactivity/ref.mjs";
8
- import { ComputedGetter, ComputedRef, ComputedSetter, WritableComputedOptions, WritableComputedRef, computed } from "./reactivity/computed.mjs";
9
- import { nextTick } from "./scheduler.mjs";
10
- import { EffectScope, batch, effect, effectScope, endBatch, getCurrentScope, onScopeDispose, startBatch, stop } from "./reactivity/core.mjs";
11
- import { MutationKind, MutationOp, MutationRecord, addMutationRecorder, removeMutationRecorder } from "./reactivity/reactive/mutation.mjs";
12
- import { PrelinkReactiveTreeOptions, prelinkReactiveTree, touchReactive } from "./reactivity/reactive/patch.mjs";
13
- import { isShallowReactive, shallowReactive } from "./reactivity/reactive/shallow.mjs";
14
- import { toRaw } from "./reactivity/reactive/shared.mjs";
15
- import { getReactiveVersion, isRaw, isReactive, markRaw, reactive } from "./reactivity/reactive.mjs";
16
- import { isProxy, isReadonly, readonly, shallowReadonly } from "./reactivity/readonly.mjs";
17
- import { isShallowRef, shallowRef, triggerRef } from "./reactivity/shallowRef.mjs";
18
- import { ToRefs, toRef, toRefs } from "./reactivity/toRefs.mjs";
19
- import { traverse } from "./reactivity/traverse.mjs";
20
- import { MapSources, MaybeUndefined, MultiWatchSources, OnCleanup, WatchCallback, WatchEffect, WatchEffectOptions, WatchMultiSources, WatchOptions, WatchScheduler, WatchSource, WatchSourceValue, WatchSources, WatchStopHandle, getDeepWatchStrategy, setDeepWatchStrategy } from "./reactivity/watch/types.mjs";
21
- import { watch, watchEffect, watchPostEffect, watchSyncEffect } from "./reactivity/watch.mjs";
22
- import "./reactivity/index.mjs";
23
- import { ComponentPublicInstance, ComputedDefinitions, ExtractComputed, ExtractMethods, MethodDefinitions, ModelBinding, ModelBindingOptions, ModelBindingPayload } from "./runtime/types/core.mjs";
24
- import { AppConfig, InternalRuntimeState, InternalRuntimeStateFields, RuntimeApp, RuntimeInstance, WevuPlugin } from "./runtime/types/runtime.mjs";
25
- import { SetupContext, SetupContextIntersectionObserver, SetupContextIntersectionObserverOptions, SetupContextNativeInstance, SetupContextSelectorQuery, SetupFunction } from "./runtime/types/props/setup.mjs";
26
- import { AllowedComponentProps, ComponentCustomProps, ComponentOptionsMixin, DefineComponent, NativeComponent, ObjectDirective, PublicProps, ShallowUnwrapRef, VNode, VNodeProps } from "./vue-types.mjs";
27
- import { SetDataBindingDiagnostic, SetDataDebugInfo, SetDataSnapshotOptions } from "./runtime/types/setData.mjs";
28
- import { CreateAppOptions, DataOption, DefineAppOptions, DefineComponentOptions, PageFeatures } from "./runtime/types/options.mjs";
29
- import { GlobalComponents, GlobalDirectives, MiniProgramTemplateRefValue, TemplateRefValue, TemplateRefs, WevuGlobalComponents, WevuGlobalDirectives } from "./runtime/types.mjs";
30
- import "./runtime/templateRefTypes.mjs";
31
- import "./vue-augment.mjs";
32
- import { useCssModule } from "./runtime/css.mjs";
33
- import { WevuDefaults, resetWevuDefaults } from "./runtime/defaults.mjs";
34
- import { ComponentDefinition, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, SetupContextWithTypeProps, SetupFunctionWithTypeProps, WevuComponentConstructor, WevuDefinedComponent } from "./runtime/define.mjs";
35
- import { DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, useDisposables } from "./runtime/disposables.mjs";
36
- import { ElementIntersectionObserverCallback, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, useElementIntersectionObserver } from "./runtime/elementIntersectionObserver.mjs";
37
- import { PageLayoutState, WevuPageLayoutMap } from "./runtime/pageLayout.mjs";
38
- import { LayoutHostBinding } from "./runtime/capabilities.mjs";
39
- import { LayoutBridgeInstance } from "./runtime/layoutBridge.mjs";
40
- import { registerPageLayoutBridge, registerRuntimeLayoutHosts, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, setPageLayout, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, useLayoutBridge, useLayoutHosts, usePageLayout, waitForLayoutHost } from "./runtime/features/publicLayout.mjs";
41
- import { callHookList, callHookReturn, getCurrentInstance, getCurrentSetupContext, setCurrentInstance, setCurrentSetupContext } from "./runtime/hooks/base.mjs";
42
- import { onAddToFavorites, onAttached, onDetached, onError, onHide, onLaunch, onLoad, onMemoryWarning, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload } from "./runtime/hooks/register.mjs";
43
- import { callUpdateHooks, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated } from "./runtime/hooks/vue.mjs";
44
- import { UseIntersectionObserverOptions, UseIntersectionObserverResult, useIntersectionObserver } from "./runtime/intersectionObserver.mjs";
45
- import { isNoSetData, markNoSetData } from "./runtime/noSetData.mjs";
46
- import { NavigationBarMetrics, PageStackSnapshot, UseNavigationBarMetricsOptions, UsePageStackOptions, getCurrentPageStackSnapshot, getNavigationBarMetrics, useNavigationBarMetrics, usePageStack } from "./runtime/pageEnvironment.mjs";
47
- import { UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, usePageScrollThrottle } from "./runtime/pageScroll.mjs";
48
- import { setGlobalProvidedValue } from "./runtime/provideStore.mjs";
49
- import { hasInjectionContext, inject, injectGlobal, provide, provideGlobal } from "./runtime/provide.mjs";
50
- import { setRuntimeSetDataVisibility, teardownRuntimeInstance } from "./runtime/register/runtimeInstance.mjs";
51
- import { runSetupFunction } from "./runtime/register/setup.mjs";
52
- import { createApp, createWevuComponent, createWevuScopedSlotComponent, defineComponent, mountRuntimeInstance, registerApp, registerComponent, setWevuDefaults } from "./runtime/publicRuntime.mjs";
53
- import { PullDownRefreshHandler, UseAsyncPullDownRefreshOptions, useAsyncPullDownRefresh } from "./runtime/pullDownRefresh.mjs";
54
- import { UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseBoundingClientRectOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, useBoundingClientRect, useScrollOffset, useSelectorFields, useSelectorQuery } from "./runtime/selectorQuery.mjs";
55
- import { normalizeClass, normalizeStyle, resolvePropValue } from "./runtime/template.mjs";
56
- import { UpdatePerformanceListener, UpdatePerformanceListenerResult, UseUpdatePerformanceListenerStopHandle, useUpdatePerformanceListener } from "./runtime/updatePerformance.mjs";
57
- import { defineAppSetup, use } from "./runtime/use.mjs";
58
- import { useAttrs, useNativeInstance, useSlots } from "./runtime/vueCompat/context.mjs";
59
- import { ModelModifiers, UseModelOptions, mergeModels, useBindModel, useChangeModel, useModel } from "./runtime/vueCompat/model.mjs";
60
- import { useNativePageRouter, useNativeRouter } from "./runtime/vueCompat/router.mjs";
61
- import { TemplateRef, useTemplateRef } from "./runtime/vueCompat/templateRef.mjs";
62
- import "./runtime/index.mjs";
63
- import { ComponentTypeEmits, EmitFn, EmitsOptions } from "./macros/shared.mjs";
64
- import { DefineModelModifiers, DefineModelTransformOptions, ModelRef, PageLayoutMeta, PageMeta, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, withDefaults } from "./macros.mjs";
65
- import { ActionContext, ActionSubscriber, DefineStoreOptions, MutationType, Pinia, PiniaCustomProperties, PiniaCustomStateProperties, PiniaPlugin, PiniaPluginContext, StateTree, StoreActions, StoreDefinition, StoreGeneric, StoreManager, StoreState, StoreSubscribeOptions, SubscriptionCallback, SubscriptionCallbackMutation } from "./store/types.mjs";
66
- import { defineStore } from "./store/define.mjs";
67
- import { createPinia, createStore, disposePinia, getActivePinia, setActivePinia } from "./store/manager.mjs";
68
- import { StoreToRefsResult, storeToRefs } from "./store/storeToRefs.mjs";
69
- import "./store.mjs";
70
- import { version } from "./version.mjs";
71
- export * from "@wevu/web-apis";
72
- export { type ActionContext, type ActionSubscriber, type AlipayMiniProgramHostNamespace, type AlipayMiniProgramHostSourceContract, type AllowedComponentProps, type AppConfig, type AsyncDerivation, type AsyncDerivationContext, type AsyncDerivationState, type AsyncDerivationStatus, type ComponentCustomProps, type ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComponentTypeEmits, type ComputedDefinitions, type ComputedGetter, type ComputedRef, type ComputedSetter, type CreateAppOptions, type CustomRefFactory, type CustomRefOptions, type CustomRefSource, type DataOption, type DefaultMiniProgramHostNamespace, type DefaultMiniProgramHostSourceContract, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, type DefineComponentTypePropsOptions, type DefineComponentWithTypeProps, DefineModelModifiers, DefineModelTransformOptions, type DefineStoreOptions, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, type DouyinMiniProgramHostNamespace, type DouyinMiniProgramHostSourceContract, type EffectScope, ElementIntersectionObserverCallback, type EmitFn, type EmitsOptions, type ExtractComputed, type ExtractDefaultPropTypes, type ExtractMethods, type ExtractPropTypes, type ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, type HostMiniProgramAddToFavoritesOption, type HostMiniProgramAppOptions, type HostMiniProgramAppTrivialInstance, type HostMiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray, type HostMiniProgramComponentInstance, type HostMiniProgramComponentMethodOption, type HostMiniProgramComponentPropertyOption, type HostMiniProgramComponentPropertyValue, type HostMiniProgramComponentShortProperty, type HostMiniProgramComponentTrivialInstance, type HostMiniProgramComponentTrivialOption, type HostMiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption, type HostMiniProgramNodesRef, type HostMiniProgramNodesRefFields, type HostMiniProgramPageLifetime, type HostMiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption, type HostMiniProgramPageScrollOption, type HostMiniProgramPageTrivialInstance, type HostMiniProgramReLaunchOption, type HostMiniProgramRedirectToOption, type HostMiniProgramRouter, type HostMiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption, type HostMiniProgramThemeChangeResult, type HostMiniProgramTriggerEventOptions, type HostMiniProgramUnhandledRejectionResult, type InferNativePropType, type InferNativeProps, type InferPropType, type InferProps, type InternalRuntimeState, type InternalRuntimeStateFields, type LayoutBridgeInstance, type LayoutHostBinding, type MapSources, type MaybeRef, type MaybeRefOrGetter, type MaybeUndefined, type MethodDefinitions, type MiniProgramAdapter, type HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, type MiniProgramComponentInstance, type HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, type MiniProgramComponentOptions, type HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, type MiniProgramComponentPropertyValue, type MiniProgramComponentRawOptions, type HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, type MiniProgramHostNamespace, type MiniProgramHostNamespaceBySource, type MiniProgramHostSourceName, type MiniProgramHostSourceRegistry, type MiniProgramInstance, type HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, type HostMiniProgramNodesRef as MiniProgramNodesRef, type HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, type HostMiniProgramPageLifetime as MiniProgramPageLifetime, type MiniProgramPageLifetimes, type HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, type HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, type MiniProgramPlatformHostNamespaceBySource, type MiniProgramPlatformHostSourceName, type MiniProgramPlatformHostSourceRegistry, type HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, type HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, type HostMiniProgramRouter as MiniProgramRouter, type MiniProgramRouterNavigateToOption, type MiniProgramRouterReLaunchOption, type MiniProgramRouterRedirectToOption, type MiniProgramRouterSwitchTabOption, type MiniProgramRuntimeHostNamespaceBySource, type MiniProgramRuntimeHostSourceName, type MiniProgramRuntimeHostSourceRegistry, type HostMiniProgramSaveExitState as MiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, MiniProgramTemplateRefValue, type HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, type HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, type ModelBinding, type ModelBindingOptions, type ModelBindingPayload, type ModelModifiers, ModelRef, type MultiWatchSources, type MutationKind, type MutationOp, type MutationRecord, MutationType, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, NavigationBarMetrics, type ObjectDirective, type OnCleanup, type PageFeatures, PageLayoutMeta, type PageLayoutState, PageMeta, PageStackSnapshot, type Pinia, type PiniaCustomProperties, type PiniaCustomStateProperties, type PiniaPlugin, type PiniaPluginContext, type PrelinkReactiveTreeOptions, type PropConstructor, type PropOptions, type PropType, type PublicProps, PullDownRefreshHandler, type Ref, type RuntimeApp, type RuntimeInstance, type SetDataBindingDiagnostic, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextIntersectionObserver, type SetupContextIntersectionObserverOptions, type SetupContextNativeInstance, type SetupContextRouter, type SetupContextSelectorQuery, type SetupContextWithTypeProps, type SetupFunction, type SetupFunctionWithTypeProps, type ShallowRef, type ShallowUnwrapRef, type StateTree, type StoreActions, type StoreDefinition, type StoreGeneric, type StoreManager, type StoreState, type StoreSubscribeOptions, type StoreToRefsResult, type SubscriptionCallback, type SubscriptionCallbackMutation, type TemplateRef, TemplateRefValue, TemplateRefs, type ToRefs, type HostMiniProgramTriggerEventOptions as TriggerEventOptions, type TtMiniProgramHostNamespace, type TtMiniProgramHostSourceContract, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, type UseAsyncDerivationOptions, UseAsyncPullDownRefreshOptions, UseBoundingClientRectOptions, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, UseIntersectionObserverOptions, UseIntersectionObserverResult, type UseModelOptions, UseNavigationBarMetricsOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UsePageStackOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, UseUpdatePerformanceListenerStopHandle, type VNode, type VNodeProps, type WatchCallback, type WatchEffect, type WatchEffectOptions, type WatchMultiSources, type WatchOptions, type WatchScheduler, type WatchSource, type WatchSourceValue, type WatchSources, type WatchStopHandle, type WechatMiniProgramHostNamespace, type WechatMiniProgramHostSourceContract, type WevuComponentConstructor, type WevuDefaults, type WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, type WevuPageLayoutMap, type WevuPlugin, type WevuTypedRouterRouteMap, type WritableComputedOptions, type WritableComputedRef, addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createPinia, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, defineStore, disposePinia, effect, effectScope, endBatch, getActivePinia, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getNavigationBarMetrics, getReactiveVersion, hasInjectionContext, inject, injectGlobal, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, removeMutationRecorder, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setActivePinia, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, storeToRefs, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncDerivation, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect, withDefaults };
@@ -1,18 +0,0 @@
1
- import { AsyncDerivation, AsyncDerivationContext, AsyncDerivationState, AsyncDerivationStatus, UseAsyncDerivationOptions, useAsyncDerivation } from "./reactivity/asyncDerivation.mjs";
2
- import { CustomRefFactory, CustomRefOptions, CustomRefSource, MaybeRef, MaybeRefOrGetter, Ref, ShallowRef, customRef, isRef, ref, toValue, unref } from "./reactivity/ref.mjs";
3
- import { ComputedGetter, ComputedRef, ComputedSetter, WritableComputedOptions, WritableComputedRef, computed } from "./reactivity/computed.mjs";
4
- import { nextTick } from "./scheduler.mjs";
5
- import { EffectScope, batch, effect, effectScope, endBatch, getCurrentScope, onScopeDispose, startBatch, stop } from "./reactivity/core.mjs";
6
- import { MutationKind, MutationOp, MutationRecord, addMutationRecorder, removeMutationRecorder } from "./reactivity/reactive/mutation.mjs";
7
- import { PrelinkReactiveTreeOptions, prelinkReactiveTree, touchReactive } from "./reactivity/reactive/patch.mjs";
8
- import { isShallowReactive, shallowReactive } from "./reactivity/reactive/shallow.mjs";
9
- import { toRaw } from "./reactivity/reactive/shared.mjs";
10
- import { getReactiveVersion, isRaw, isReactive, markRaw, reactive } from "./reactivity/reactive.mjs";
11
- import { isProxy, isReadonly, readonly, shallowReadonly } from "./reactivity/readonly.mjs";
12
- import { isShallowRef, shallowRef, triggerRef } from "./reactivity/shallowRef.mjs";
13
- import { ToRefs, toRef, toRefs } from "./reactivity/toRefs.mjs";
14
- import { traverse } from "./reactivity/traverse.mjs";
15
- import { MapSources, MaybeUndefined, MultiWatchSources, OnCleanup, WatchCallback, WatchEffect, WatchEffectOptions, WatchMultiSources, WatchOptions, WatchScheduler, WatchSource, WatchSourceValue, WatchSources, WatchStopHandle, getDeepWatchStrategy, setDeepWatchStrategy } from "./reactivity/watch/types.mjs";
16
- import { watch, watchEffect, watchPostEffect, watchSyncEffect } from "./reactivity/watch.mjs";
17
- import "./reactivity/index.mjs";
18
- export { type AsyncDerivation, type AsyncDerivationContext, type AsyncDerivationState, type AsyncDerivationStatus, type ComputedGetter, type ComputedRef, type ComputedSetter, type CustomRefFactory, type CustomRefOptions, type CustomRefSource, type EffectScope, type MapSources, type MaybeRef, type MaybeRefOrGetter, type MaybeUndefined, type MultiWatchSources, type MutationKind, type MutationOp, type MutationRecord, type OnCleanup, type PrelinkReactiveTreeOptions, type Ref, type ShallowRef, type ToRefs, type UseAsyncDerivationOptions, type WatchCallback, type WatchEffect, type WatchEffectOptions, type WatchMultiSources, type WatchOptions, type WatchScheduler, type WatchSource, type WatchSourceValue, type WatchSources, type WatchStopHandle, type WritableComputedOptions, type WritableComputedRef, addMutationRecorder, batch, computed, customRef, effect, effectScope, endBatch, getCurrentScope, getDeepWatchStrategy, getReactiveVersion, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, markRaw, nextTick, onScopeDispose, prelinkReactiveTree, reactive, readonly, ref, removeMutationRecorder, setDeepWatchStrategy, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, useAsyncDerivation, watch, watchEffect, watchPostEffect, watchSyncEffect };
@@ -1,45 +0,0 @@
1
- import { useCssModule, useCssVars } from "./runtime/css.mjs";
2
- import { INTERNAL_DEFAULTS_SCOPE_KEY, resetWevuDefaults, setWevuDefaults } from "./runtime/defaults.mjs";
3
- import { createIsolatedWevuComponentDefinition, createWevuComponent, createWevuComponentDefinition, defineComponent, getWevuComponentLifecycleDefinition } from "./runtime/define.mjs";
4
- import { useDisposables } from "./runtime/disposables.mjs";
5
- import { useElementIntersectionObserver } from "./runtime/elementIntersectionObserver.mjs";
6
- import { SetDataSchedulerOptions } from "./runtime/app/setData/scheduler.mjs";
7
- import { HighFrequencyWarningMonitorOptions, LayoutHostBinding, RuntimeCapabilityName, RuntimeCapabilityRegistry, ScopedSlotMountState, SetDataScheduler, TemplateRefBinding } from "./runtime/capabilities.mjs";
8
- import { resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, setPageLayout, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, useLayoutBridge, useLayoutHosts, usePageLayout, waitForLayoutHost } from "./runtime/features/publicLayout.mjs";
9
- import { callHookList, callHookReturn, getCurrentInstance, getCurrentSetupContext, setCurrentInstance, setCurrentSetupContext } from "./runtime/hooks/base.mjs";
10
- import { onAddToFavorites, onAttached, onDetached, onError, onHide, onLaunch, onLoad, onMemoryWarning, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload } from "./runtime/hooks/register.mjs";
11
- import { onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated } from "./runtime/hooks/vue.mjs";
12
- import "./runtime/hooks.mjs";
13
- import { useIntersectionObserver } from "./runtime/intersectionObserver.mjs";
14
- import { isNoSetData, markNoSetData } from "./runtime/noSetData.mjs";
15
- import { getCurrentPageStackSnapshot, getNavigationBarMetrics, useNavigationBarMetrics, usePageStack } from "./runtime/pageEnvironment.mjs";
16
- import { usePageScrollThrottle } from "./runtime/pageScroll.mjs";
17
- import { setGlobalProvidedValue } from "./runtime/provideStore.mjs";
18
- import { hasInjectionContext, inject, injectGlobal, provide, provideGlobal } from "./runtime/provide.mjs";
19
- import { createWevuScopedSlotComponent, installScopedSlots } from "./runtime/features/scopedSlots.mjs";
20
- import { createApp } from "./runtime/app.mjs";
21
- import { registerApp } from "./runtime/register/app.mjs";
22
- import { registerComponent } from "./runtime/register/component.mjs";
23
- import { mountRuntimeInstance, setRuntimeSetDataVisibility, teardownRuntimeInstance } from "./runtime/register/runtimeInstance.mjs";
24
- import { runSetupFunction } from "./runtime/register/setup.mjs";
25
- import "./runtime/register.mjs";
26
- import { useAsyncPullDownRefresh } from "./runtime/pullDownRefresh.mjs";
27
- import { useBoundingClientRect, useScrollOffset, useSelectorFields, useSelectorQuery } from "./runtime/selectorQuery.mjs";
28
- import { useUpdatePerformanceListener } from "./runtime/updatePerformance.mjs";
29
- import { defineAppSetup, use } from "./runtime/use.mjs";
30
- import { useAttrs, useNativeInstance, useSlots } from "./runtime/vueCompat/context.mjs";
31
- import { mergeModels, useBindModel, useChangeModel, useModel } from "./runtime/vueCompat/model.mjs";
32
- import { useNativePageRouter, useNativeRouter } from "./runtime/vueCompat/router.mjs";
33
- import { useTemplateRef } from "./runtime/vueCompat/templateRef.mjs";
34
- import "./runtime/vueCompat.mjs";
35
- import { version } from "./version.mjs";
36
- import { takePendingRuntimeAppRegistration } from "./runtime/app/pending.mjs";
37
- import { installInlineEvents } from "./runtime/features/inlineEvents.mjs";
38
- import { installJsxIslands } from "./runtime/features/jsxIslands.mjs";
39
- import { installLayout } from "./runtime/features/layout.mjs";
40
- import { installPatchStrategy } from "./runtime/features/patchStrategy.mjs";
41
- import { installSetDataHighFrequencyWarning } from "./runtime/features/setDataHighFrequencyWarning.mjs";
42
- import { installTemplateRefs } from "./runtime/features/templateRefs.mjs";
43
- import { Fragment, createTextVNode, createVNode, isVNode, mergeProps, normalizeJsxIsland, resolveComponent, resolveDirective, transformOn, vModelCheckbox, vModelRadio, vModelSelect, vModelText, vShow, withDirectives } from "./runtime/jsxIsland.mjs";
44
- import { createUniAppHost } from "./runtime/uniAppHost.mjs";
45
- export { Fragment, type HighFrequencyWarningMonitorOptions, INTERNAL_DEFAULTS_SCOPE_KEY, type LayoutHostBinding, type RuntimeCapabilityName, type RuntimeCapabilityRegistry, type ScopedSlotMountState, type SetDataScheduler, type SetDataSchedulerOptions, type TemplateRefBinding, callHookList, callHookReturn, createApp, createIsolatedWevuComponentDefinition, createTextVNode, createUniAppHost, createVNode, createWevuComponent, createWevuComponentDefinition, createWevuScopedSlotComponent, defineAppSetup, defineComponent, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentSetupContext, getNavigationBarMetrics, getWevuComponentLifecycleDefinition, hasInjectionContext, inject, injectGlobal, installInlineEvents, installJsxIslands, installLayout, installPatchStrategy, installScopedSlots, installSetDataHighFrequencyWarning, installTemplateRefs, isNoSetData, isVNode, markNoSetData, mergeModels, mergeProps, mountRuntimeInstance, normalizeJsxIsland, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, provide, provideGlobal, registerApp, registerComponent, resetWevuDefaults, resolveComponent, resolveDirective, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, takePendingRuntimeAppRegistration, teardownRuntimeInstance, transformOn, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useCssVars, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, vModelCheckbox, vModelRadio, vModelSelect, vModelText, vShow, version, waitForLayoutHost, withDirectives };
@@ -1,2 +0,0 @@
1
- import { normalizeClass, normalizeStyle, resolvePropValue } from "./runtime/template.mjs";
2
- export { normalizeClass, normalizeStyle, resolvePropValue };
@@ -1,9 +0,0 @@
1
- //#region src/jsxTypes.d.ts
2
- /** Wevu JSX island 使用的内部节点结构。 */
3
- export interface WevuJsxVNode {
4
- children?: unknown;
5
- props?: Record<string, unknown> | null;
6
- type: unknown;
7
- }
8
- //#endregion
9
- //# sourceMappingURL=jsxTypes.d.mts.map
@@ -1,83 +0,0 @@
1
- import { HostMiniProgramComponentAllFullProperty, HostMiniProgramComponentAllProperty, HostMiniProgramComponentBehaviorOptions, HostMiniProgramComponentEmptyArray, HostMiniProgramComponentMethodOption, HostMiniProgramComponentPropertyOption, HostMiniProgramTriggerEventOptions } from "../runtime/types/miniprogramHost.mjs";
2
- import { MiniProgramComponentInstance, MiniProgramComponentPropertyValue } from "../runtime/types/miniprogram.mjs";
3
- import { ComponentPropsOptions, InferProps } from "../runtime/types/props/propTypes.mjs";
4
- import { ComputedDefinitions, MethodDefinitions } from "../runtime/types/core.mjs";
5
- import { DefineComponentOptions } from "../runtime/types/options.mjs";
6
- import "../runtime/index.mjs";
7
- //#region src/macros/shared.d.ts
8
- export type Prettify<T> = { [K in keyof T]: T[K]; } & {};
9
- type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
10
- type ComponentObjectPropsOptions = ComponentPropsOptions;
11
- type ExtractPropTypes<P extends ComponentObjectPropsOptions> = InferProps<P>;
12
- export type DefineProps<T, BKeys extends keyof T> = Readonly<T> & { readonly [K in BKeys]-?: boolean; };
13
- export type BooleanKey<T, K extends keyof T = keyof T> = K extends any ? T[K] extends boolean | undefined ? T[K] extends never | undefined ? never : K : never : never;
14
- export type DefinePropsFromArray<PropNames extends string = string> = Prettify<Readonly<{ [key in PropNames]?: any; }>>;
15
- export type DefinePropsFromOptions<PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions> = Prettify<Readonly<ExtractPropTypes<PP>>>;
16
- type NotUndefined<T> = T extends undefined ? never : T;
17
- type MappedOmit<T, K extends keyof any> = { [P in keyof T as P extends K ? never : P]: T[P]; };
18
- export type InferDefaults<T> = { [K in keyof T]?: InferDefault<T, T[K]>; };
19
- type NativeType = null | undefined | number | string | boolean | symbol | ((...args: any[]) => any);
20
- type InferDefault<P, T> = ((props: P) => T & {}) | (T extends NativeType ? T : never);
21
- export type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = T extends unknown ? Readonly<MappedOmit<T, keyof Defaults>> & { readonly [K in keyof Defaults as K extends keyof T ? K : never]-?: K extends keyof T ? Defaults[K] extends undefined ? IfAny<Defaults[K], NotUndefined<T[K]>, T[K]> : NotUndefined<T[K]> : never; } & { readonly [K in BKeys]-?: K extends keyof Defaults ? Defaults[K] extends undefined ? boolean | undefined : boolean : boolean; } : never;
22
- export type UnionToIntersection<U> = (U extends any ? (arg: U) => any : never) extends ((arg: infer I) => any) ? I : never;
23
- type ScriptSetupTriggerEventOptions = HostMiniProgramTriggerEventOptions;
24
- type EmitArgsWithTriggerEventOptions<Args extends any[]> = Args extends [] ? [] | [detail: undefined, options: ScriptSetupTriggerEventOptions] : Args | [...args: Args, options: ScriptSetupTriggerEventOptions];
25
- type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null>;
26
- export type EmitsOptions = ObjectEmitsOptions | string[];
27
- export type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> = Options extends Array<infer V> ? (event: V, ...args: any[]) => void : {} extends Options ? (event: string, ...args: any[]) => void : UnionToIntersection<{ [K in Event]: Options[K] extends ((...args: infer Args) => any) ? (event: K, ...args: EmitArgsWithTriggerEventOptions<Args>) => void : Options[K] extends any[] ? (event: K, ...args: EmitArgsWithTriggerEventOptions<Options[K]>) => void : (event: K, ...args: any[]) => void; }[Event]>;
28
- export type ComponentTypeEmits = ((...args: any[]) => any) | Record<string, any>;
29
- type RecordToUnion<T extends Record<string, any>> = T[keyof T];
30
- export type ShortEmits<T extends Record<string, any>> = UnionToIntersection<RecordToUnion<{ [K in keyof T]: (evt: K, ...args: EmitArgsWithTriggerEventOptions<T[K]>) => void; }>>;
31
- type ScriptSetupNativePropertyOption = HostMiniProgramComponentPropertyOption;
32
- type ScriptSetupNativeMethodOption = HostMiniProgramComponentMethodOption;
33
- type ScriptSetupNativeBehaviorOption = HostMiniProgramComponentEmptyArray;
34
- type ScriptSetupNativeInstance<D extends object, P extends ScriptSetupNativePropertyOption, M extends ScriptSetupNativeMethodOption> = MiniProgramComponentInstance<D, P, M, ScriptSetupNativeBehaviorOption>;
35
- type ScriptSetupObservedProperty<TProperty extends HostMiniProgramComponentAllFullProperty, TInstance> = Omit<TProperty, 'observer'> & {
36
- observer?: string | ((this: TInstance, newVal: MiniProgramComponentPropertyValue<TProperty>, oldVal: MiniProgramComponentPropertyValue<TProperty>, changedPath: Array<string | number>) => void);
37
- };
38
- type ScriptSetupPropertyObserver<TProperty extends HostMiniProgramComponentAllProperty, TInstance> = TProperty extends (infer TCurrent extends HostMiniProgramComponentAllFullProperty) ? ScriptSetupObservedProperty<TCurrent, TInstance> : TProperty;
39
- type ScriptSetupNativeProperties<D extends object, P extends ScriptSetupNativePropertyOption, M extends ScriptSetupNativeMethodOption> = { [K in keyof P]: ScriptSetupPropertyObserver<P[K], ScriptSetupNativeInstance<D, P, M>>; };
40
- type ScriptSetupNativeMethods<D extends object, P extends ScriptSetupNativePropertyOption, M extends ScriptSetupNativeMethodOption> = M & ThisType<ScriptSetupNativeInstance<D, P, M>>;
41
- type RemoveIndexSignature<T> = { [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; };
42
- export type ScriptSetupDefineOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P extends ScriptSetupNativePropertyOption = ScriptSetupNativePropertyOption> = Omit<RemoveIndexSignature<DefineComponentOptions<ComponentPropsOptions, D, C, M>>, 'props' | 'options' | 'data' | 'methods'> & {
43
- /** 组件静态名称,供编译器匹配组件配置。 */
44
- name?: string;
45
- /**
46
- * props 必须通过 defineProps() 声明。
47
- */
48
- props?: never;
49
- /**
50
- * emits 必须通过 defineEmits() 声明。
51
- */
52
- emits?: never;
53
- /**
54
- * expose 必须通过 defineExpose() 声明。
55
- */
56
- expose?: never;
57
- /**
58
- * slots 必须通过 defineSlots() 声明。
59
- */
60
- slots?: never;
61
- /**
62
- * 小程序 Component 选项(multipleSlots/styleIsolation 等)。
63
- */
64
- options?: HostMiniProgramComponentBehaviorOptions;
65
- /**
66
- * 小程序原生 properties。
67
- */
68
- properties?: ScriptSetupNativeProperties<D, P, M>;
69
- /**
70
- * 小程序原生 data。
71
- */
72
- data?: D | (() => D);
73
- /**
74
- * 小程序原生 methods。
75
- */
76
- methods?: ScriptSetupNativeMethods<D, P, M>;
77
- /**
78
- * setup 执行时机(默认 attached)。
79
- */
80
- setupLifecycle?: 'created' | 'attached';
81
- };
82
- //#endregion
83
- //# sourceMappingURL=shared.d.mts.map
@@ -1,71 +0,0 @@
1
- import { HostMiniProgramComponentPropertyOption } from "./runtime/types/miniprogramHost.mjs";
2
- import { ComponentPropsOptions } from "./runtime/types/props/propTypes.mjs";
3
- import { Ref } from "./reactivity/ref.mjs";
4
- import "./reactivity/index.mjs";
5
- import { ComputedDefinitions, MethodDefinitions } from "./runtime/types/core.mjs";
6
- import "./runtime/index.mjs";
7
- import { BooleanKey, ComponentTypeEmits, DefineProps, DefinePropsFromArray, DefinePropsFromOptions, EmitFn, EmitsOptions, InferDefaults, PropsWithDefaults, ScriptSetupDefineOptions, ShortEmits } from "./macros/shared.mjs";
8
- //#region src/macros.d.ts
9
- /**
10
- * defineProps 声明(类型层宏)。
11
- */
12
- export declare function defineProps<PropNames extends string = string>(props: PropNames[]): DefinePropsFromArray<PropNames>;
13
- export declare function defineProps<PP extends ComponentPropsOptions = ComponentPropsOptions>(props: PP): DefinePropsFromOptions<PP>;
14
- export declare function defineProps<TypeProps>(): DefineProps<TypeProps, BooleanKey<TypeProps>>;
15
- /**
16
- * withDefaults 为 defineProps 声明默认值(类型层)。
17
- */
18
- export declare function withDefaults<T, BKeys extends keyof T, Defaults extends InferDefaults<T>>(props: DefineProps<T, BKeys>, defaults: Defaults): PropsWithDefaults<T, Defaults, BKeys>;
19
- /**
20
- * defineEmits 声明(类型层宏)。
21
- */
22
- export declare function defineEmits<EE extends string = string>(emits?: EE[]): EmitFn<EE[]>;
23
- export declare function defineEmits<E extends EmitsOptions = EmitsOptions>(emits?: E): EmitFn<E>;
24
- export declare function defineEmits<T extends ComponentTypeEmits>(): T extends ((...args: any[]) => any) ? T : ShortEmits<T>;
25
- /**
26
- * defineExpose 向父级 ref 暴露成员(仅类型层)。
27
- */
28
- export declare function defineExpose<T extends Record<string, any> = Record<string, any>>(exposed?: T): void;
29
- /**
30
- * defineOptions 设置 `<script setup>` 组件选项(仅类型层)。
31
- */
32
- export declare function defineOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P extends HostMiniProgramComponentPropertyOption = HostMiniProgramComponentPropertyOption>(options?: ScriptSetupDefineOptions<D, C, M, P>): void;
33
- export declare function defineOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P extends HostMiniProgramComponentPropertyOption = HostMiniProgramComponentPropertyOption>(options?: () => ScriptSetupDefineOptions<D, C, M, P> | Promise<ScriptSetupDefineOptions<D, C, M, P>>): void;
34
- /**
35
- * defineSlots 声明 slots 类型(仅类型层)。
36
- */
37
- export declare function defineSlots<T extends Record<string, any> = Record<string, any>>(): T;
38
- export type PageLayoutMeta = string | false | {
39
- name: string;
40
- props?: Record<string, unknown>;
41
- };
42
- export interface PageMeta {
43
- layout?: PageLayoutMeta;
44
- [key: string]: unknown;
45
- }
46
- /**
47
- * definePageMeta 声明页面级元信息(仅类型层)。
48
- */
49
- export declare function definePageMeta(meta: PageMeta): void;
50
- /**
51
- * defineModel 声明 v-model 绑定(类型层宏)。
52
- */
53
- export type DefineModelModifiers<M extends PropertyKey = string> = Record<M, true | undefined>;
54
- export type ModelRef<T, M extends PropertyKey = string, G = T, S = T> = Ref<G, S> & [ModelRef<T, M, G, S>, DefineModelModifiers<M>];
55
- export interface DefineModelTransformOptions<T, M extends PropertyKey = string, G = T, S = T> {
56
- get?: (value: T, modifiers: DefineModelModifiers<M>) => G;
57
- set?: (value: S, modifiers: DefineModelModifiers<M>) => T;
58
- }
59
- type DefineModelBaseOptions<T, M extends PropertyKey = string, G = T, S = T> = Record<string, any> & DefineModelTransformOptions<T, M, G, S>;
60
- type DefineModelRequiredOptions<T> = {
61
- default: T | (() => T);
62
- } | {
63
- required: true;
64
- };
65
- export declare function defineModel<T = any, M extends PropertyKey = string, G = T, S = T>(options: DefineModelBaseOptions<T, M, G, S> & DefineModelRequiredOptions<T>): ModelRef<T, M, G, S>;
66
- export declare function defineModel<T = any, M extends PropertyKey = string, G = T, S = T>(name: string, options: DefineModelBaseOptions<T, M, G, S> & DefineModelRequiredOptions<T>): ModelRef<T, M, G, S>;
67
- export declare function defineModel<T = any, M extends PropertyKey = string, G = T, S = T>(options?: DefineModelBaseOptions<T | undefined, M, G | undefined, S | undefined>): ModelRef<T | undefined, M, G | undefined, S | undefined>;
68
- export declare function defineModel<T = any, M extends PropertyKey = string, G = T, S = T>(name?: string, options?: DefineModelBaseOptions<T | undefined, M, G | undefined, S | undefined>): ModelRef<T | undefined, M, G | undefined, S | undefined>;
69
- //#endregion
70
- export type { ComponentTypeEmits, EmitFn, EmitsOptions };
71
- //# sourceMappingURL=macros.d.mts.map
@@ -1,41 +0,0 @@
1
- //#region src/reactivity/asyncDerivation.d.ts
2
- /** 异步派生状态的生命周期阶段。 */
3
- export type AsyncDerivationStatus = 'idle' | 'initial-pending' | 'ready' | 'refreshing' | 'error' | 'disposed';
4
- /** 传给异步加载函数的当前任务上下文。 */
5
- export interface AsyncDerivationContext {
6
- readonly signal: AbortSignal;
7
- }
8
- /** `useAsyncDerivation()` 的配置。 */
9
- export interface UseAsyncDerivationOptions {
10
- immediate?: boolean;
11
- }
12
- type AsyncDerivationIdleState<TStatus extends 'idle' | 'initial-pending' | 'disposed'> = Readonly<{
13
- status: TStatus;
14
- value: undefined;
15
- error: undefined;
16
- }>;
17
- type AsyncDerivationReadyState<T, TStatus extends 'ready' | 'refreshing'> = Readonly<{
18
- status: TStatus;
19
- value: T;
20
- error: undefined;
21
- }>;
22
- type AsyncDerivationErrorState<T> = Readonly<{
23
- status: 'error';
24
- value: T | undefined;
25
- error: unknown;
26
- }>;
27
- /** 模板可观察的只读异步派生状态。 */
28
- export type AsyncDerivationState<T> = AsyncDerivationIdleState<'idle'> | AsyncDerivationIdleState<'initial-pending'> | AsyncDerivationIdleState<'disposed'> | AsyncDerivationReadyState<T, 'ready'> | AsyncDerivationReadyState<T, 'refreshing'> | AsyncDerivationErrorState<T>;
29
- type AsyncDerivationControls = Readonly<{
30
- refresh: () => Promise<void>;
31
- dispose: () => void;
32
- }>;
33
- /** 异步派生状态及其非枚举控制方法。 */
34
- export type AsyncDerivation<T> = AsyncDerivationState<T> & AsyncDerivationControls;
35
- /**
36
- * 创建面向静态 WXML 数据绑定的异步派生状态。
37
- * 加载错误通过 `status` 与 `error` 暴露,`refresh()` 始终正常完成。
38
- */
39
- export declare function useAsyncDerivation<T>(loader: (context: AsyncDerivationContext) => T | PromiseLike<T>, options?: UseAsyncDerivationOptions): AsyncDerivation<T>;
40
- //#endregion
41
- //# sourceMappingURL=asyncDerivation.d.mts.map
@@ -1,25 +0,0 @@
1
- import { Ref } from "./ref.mjs";
2
- //#region src/reactivity/computed.d.ts
3
- export type ComputedGetter<T> = () => T;
4
- export type ComputedSetter<T> = (value: T) => void;
5
- declare const computedBrand: unique symbol;
6
- declare const writableComputedBrand: unique symbol;
7
- interface BaseComputedRef<T, S = T> extends Ref<T, S> {
8
- [key: symbol]: any;
9
- }
10
- export interface ComputedRef<T = any> extends BaseComputedRef<T> {
11
- readonly [computedBrand]: true;
12
- readonly value: T;
13
- }
14
- export interface WritableComputedRef<T, S = T> extends BaseComputedRef<T, S> {
15
- readonly [writableComputedBrand]: true;
16
- value: T;
17
- }
18
- export interface WritableComputedOptions<T> {
19
- get: ComputedGetter<T>;
20
- set: ComputedSetter<T>;
21
- }
22
- export declare function computed<T>(getter: ComputedGetter<T>): ComputedRef<T>;
23
- export declare function computed<T>(options: WritableComputedOptions<T>): WritableComputedRef<T>;
24
- //#endregion
25
- //# sourceMappingURL=computed.d.mts.map
@@ -1,35 +0,0 @@
1
- //#region src/reactivity/core.d.ts
2
- export type EffectScheduler = () => void;
3
- export type Dep = Set<ReactiveEffect>;
4
- export interface ReactiveEffect<T = any> {
5
- (): T;
6
- deps: Dep[];
7
- scheduler?: EffectScheduler;
8
- active: boolean;
9
- _running: boolean;
10
- _fn: () => T;
11
- _computed?: boolean;
12
- onStop?: () => void;
13
- }
14
- export declare function startBatch(): void;
15
- export declare function endBatch(): void;
16
- export declare function batch<T>(fn: () => T): T;
17
- export declare function stop(runner: ReactiveEffect): void;
18
- export interface EffectScope {
19
- active: boolean;
20
- effects: ReactiveEffect[];
21
- cleanups: (() => void)[];
22
- run: <T>(fn: () => T) => T | undefined;
23
- stop: () => void;
24
- }
25
- export declare function effectScope(detached?: boolean): EffectScope;
26
- export declare function getCurrentScope(): EffectScope | undefined;
27
- export declare function onScopeDispose(fn: () => void): void;
28
- export interface EffectOptions {
29
- scheduler?: EffectScheduler;
30
- lazy?: boolean;
31
- onStop?: () => void;
32
- }
33
- export declare function effect<T = any>(fn: () => T, options?: EffectOptions): ReactiveEffect<T>;
34
- //#endregion
35
- //# sourceMappingURL=core.d.mts.map
@@ -1,16 +0,0 @@
1
- import { AsyncDerivation, AsyncDerivationContext, AsyncDerivationState, AsyncDerivationStatus, UseAsyncDerivationOptions, useAsyncDerivation } from "./asyncDerivation.mjs";
2
- import { CustomRefFactory, CustomRefOptions, CustomRefSource, MaybeRef, MaybeRefOrGetter, Ref, ShallowRef, customRef, isRef, ref, toValue, unref } from "./ref.mjs";
3
- import { ComputedGetter, ComputedRef, ComputedSetter, WritableComputedOptions, WritableComputedRef, computed } from "./computed.mjs";
4
- import { EffectScope, batch, effect, effectScope, endBatch, getCurrentScope, onScopeDispose, startBatch, stop } from "./core.mjs";
5
- import { MutationKind, MutationOp, MutationRecord, addMutationRecorder, removeMutationRecorder } from "./reactive/mutation.mjs";
6
- import { PrelinkReactiveTreeOptions, prelinkReactiveTree, touchReactive } from "./reactive/patch.mjs";
7
- import { isShallowReactive, shallowReactive } from "./reactive/shallow.mjs";
8
- import { toRaw } from "./reactive/shared.mjs";
9
- import { getReactiveVersion, isRaw, isReactive, markRaw, reactive } from "./reactive.mjs";
10
- import { isProxy, isReadonly, readonly, shallowReadonly } from "./readonly.mjs";
11
- import { isShallowRef, shallowRef, triggerRef } from "./shallowRef.mjs";
12
- import { ToRefs, toRef, toRefs } from "./toRefs.mjs";
13
- import { traverse } from "./traverse.mjs";
14
- import { MapSources, MaybeUndefined, MultiWatchSources, OnCleanup, WatchCallback, WatchEffect, WatchEffectOptions, WatchMultiSources, WatchOptions, WatchScheduler, WatchSource, WatchSourceValue, WatchSources, WatchStopHandle, getDeepWatchStrategy, setDeepWatchStrategy } from "./watch/types.mjs";
15
- import { watch, watchEffect, watchPostEffect, watchSyncEffect } from "./watch.mjs";
16
- export { type AsyncDerivation, type AsyncDerivationContext, type AsyncDerivationState, type AsyncDerivationStatus, type ComputedGetter, type ComputedRef, type ComputedSetter, type CustomRefFactory, type CustomRefOptions, type CustomRefSource, type EffectScope, type MapSources, type MaybeRef, type MaybeRefOrGetter, type MaybeUndefined, type MultiWatchSources, type MutationKind, type MutationOp, type MutationRecord, type OnCleanup, type PrelinkReactiveTreeOptions, type Ref, type ShallowRef, type ToRefs, type UseAsyncDerivationOptions, type WatchCallback, type WatchEffect, type WatchEffectOptions, type WatchMultiSources, type WatchOptions, type WatchScheduler, type WatchSource, type WatchSourceValue, type WatchSources, type WatchStopHandle, type WritableComputedOptions, type WritableComputedRef, addMutationRecorder, batch, computed, customRef, effect, effectScope, endBatch, getCurrentScope, getDeepWatchStrategy, getReactiveVersion, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, markRaw, onScopeDispose, prelinkReactiveTree, reactive, readonly, ref, removeMutationRecorder, setDeepWatchStrategy, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, useAsyncDerivation, watch, watchEffect, watchPostEffect, watchSyncEffect };