wevu 7.1.3 → 7.2.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 (133) hide show
  1. package/README.md +20 -6
  2. package/dist/dev/index.d.mts +3 -3
  3. package/dist/dev/index.mjs +3 -2
  4. package/dist/dev/package.mjs +1 -1
  5. package/dist/dev/reactivity/computed.d.mts +4 -0
  6. package/dist/dev/reactivity/computed.mjs +10 -1
  7. package/dist/dev/reactivity/computed.mjs.map +1 -1
  8. package/dist/dev/reactivity/reactive.mjs +27 -20
  9. package/dist/dev/reactivity/reactive.mjs.map +1 -1
  10. package/dist/dev/router/auto-routes.d.mts +8 -0
  11. package/dist/dev/router/auto-routes.mjs +11 -0
  12. package/dist/dev/router/auto-routes.mjs.map +1 -0
  13. package/dist/dev/router/createRouter.d.mts +2 -1
  14. package/dist/dev/router/createRouter.mjs +3 -4
  15. package/dist/dev/router/createRouter.mjs.map +1 -1
  16. package/dist/dev/router/navigationCore.d.mts +3 -2
  17. package/dist/dev/router/navigationCore.mjs +7 -7
  18. package/dist/dev/router/navigationCore.mjs.map +1 -1
  19. package/dist/dev/router/resolve.d.mts +3 -2
  20. package/dist/dev/router/resolve.mjs.map +1 -1
  21. package/dist/dev/router/routeSync.d.mts +1 -0
  22. package/dist/dev/router/types.d.mts +173 -78
  23. package/dist/dev/router/types.mjs.map +1 -1
  24. package/dist/dev/router/useRoute.d.mts +4 -3
  25. package/dist/dev/router/useRoute.mjs.map +1 -1
  26. package/dist/dev/router/useRouter.d.mts +2 -1
  27. package/dist/dev/router/useRouter.mjs.map +1 -1
  28. package/dist/dev/router.d.mts +19 -3
  29. package/dist/dev/routerInternal/location.d.mts +2 -0
  30. package/dist/dev/routerInternal/matching.d.mts +2 -0
  31. package/dist/dev/routerInternal/matching.mjs +1 -1
  32. package/dist/dev/routerInternal/matching.mjs.map +1 -1
  33. package/dist/dev/routerInternal/params.d.mts +2 -0
  34. package/dist/dev/routerInternal/params.mjs.map +1 -1
  35. package/dist/dev/routerInternal/records.d.mts +2 -0
  36. package/dist/dev/routerInternal/recordsWarnings.d.mts +2 -0
  37. package/dist/dev/routerInternal/shared.d.mts +9 -0
  38. package/dist/dev/routerInternal/snapshots.d.mts +2 -0
  39. package/dist/dev/runtime/hooks/base.mjs +5 -5
  40. package/dist/dev/runtime/hooks/base.mjs.map +1 -1
  41. package/dist/dev/runtime/platform.mjs +31 -24
  42. package/dist/dev/runtime/platform.mjs.map +1 -1
  43. package/dist/dev/runtime/register/component/alipay.mjs +72 -0
  44. package/dist/dev/runtime/register/component/alipay.mjs.map +1 -0
  45. package/dist/dev/runtime/register/component/registerNativeDefinition.mjs +5 -2
  46. package/dist/dev/runtime/register/component/registerNativeDefinition.mjs.map +1 -1
  47. package/dist/dev/store/actions.mjs +27 -29
  48. package/dist/dev/store/actions.mjs.map +1 -1
  49. package/dist/dev/store/base.mjs +152 -36
  50. package/dist/dev/store/base.mjs.map +1 -1
  51. package/dist/dev/store/define/create.mjs +92 -0
  52. package/dist/dev/store/define/create.mjs.map +1 -0
  53. package/dist/dev/store/define.d.mts +5 -16
  54. package/dist/dev/store/define.mjs +11 -15
  55. package/dist/dev/store/define.mjs.map +1 -1
  56. package/dist/dev/store/manager.d.mts +13 -5
  57. package/dist/dev/store/manager.mjs +55 -14
  58. package/dist/dev/store/manager.mjs.map +1 -1
  59. package/dist/dev/store/storeToRefs.d.mts +5 -7
  60. package/dist/dev/store/storeToRefs.mjs +10 -18
  61. package/dist/dev/store/storeToRefs.mjs.map +1 -1
  62. package/dist/dev/store/subscriptions.mjs +17 -0
  63. package/dist/dev/store/subscriptions.mjs.map +1 -0
  64. package/dist/dev/store/types.d.mts +85 -59
  65. package/dist/dev/store/types.mjs +11 -0
  66. package/dist/dev/store/types.mjs.map +1 -0
  67. package/dist/dev/store/utils.mjs +1 -37
  68. package/dist/dev/store/utils.mjs.map +1 -1
  69. package/dist/dev/store/view.mjs +56 -0
  70. package/dist/dev/store/view.mjs.map +1 -0
  71. package/dist/dev/store.d.mts +3 -3
  72. package/dist/dev/store.mjs +3 -2
  73. package/dist/dev/vue-demi.d.mts +3 -3
  74. package/dist/dev/vue-demi.mjs +3 -2
  75. package/dist/dev/vue-demi.mjs.map +1 -1
  76. package/dist/index.d.mts +3 -3
  77. package/dist/index.mjs +1 -1
  78. package/dist/package.mjs +1 -1
  79. package/dist/reactivity/computed.d.mts +4 -0
  80. package/dist/reactivity/computed.mjs +1 -1
  81. package/dist/reactivity/reactive.mjs +1 -1
  82. package/dist/router/auto-routes.d.mts +7 -0
  83. package/dist/router/auto-routes.mjs +1 -0
  84. package/dist/router/createRouter.d.mts +2 -1
  85. package/dist/router/createRouter.mjs +1 -1
  86. package/dist/router/navigationCore.d.mts +3 -2
  87. package/dist/router/navigationCore.mjs +1 -1
  88. package/dist/router/resolve.d.mts +3 -2
  89. package/dist/router/routeSync.d.mts +1 -0
  90. package/dist/router/types.d.mts +173 -78
  91. package/dist/router/useRoute.d.mts +4 -3
  92. package/dist/router/useRouter.d.mts +2 -1
  93. package/dist/router.d.mts +18 -3
  94. package/dist/routerInternal/location.d.mts +2 -0
  95. package/dist/routerInternal/matching.d.mts +2 -0
  96. package/dist/routerInternal/matching.mjs +1 -1
  97. package/dist/routerInternal/params.d.mts +2 -0
  98. package/dist/routerInternal/records.d.mts +2 -0
  99. package/dist/routerInternal/recordsWarnings.d.mts +2 -0
  100. package/dist/routerInternal/shared.d.mts +9 -0
  101. package/dist/routerInternal/snapshots.d.mts +2 -0
  102. package/dist/runtime/hooks/base.mjs +1 -1
  103. package/dist/runtime/platform.mjs +1 -1
  104. package/dist/runtime/register/component/alipay.mjs +1 -0
  105. package/dist/runtime/register/component/registerNativeDefinition.mjs +1 -1
  106. package/dist/store/actions.mjs +1 -1
  107. package/dist/store/base.mjs +1 -1
  108. package/dist/store/define/create.mjs +1 -0
  109. package/dist/store/define.d.mts +5 -16
  110. package/dist/store/define.mjs +1 -1
  111. package/dist/store/manager.d.mts +13 -5
  112. package/dist/store/manager.mjs +1 -1
  113. package/dist/store/storeToRefs.d.mts +5 -7
  114. package/dist/store/storeToRefs.mjs +1 -1
  115. package/dist/store/subscriptions.mjs +1 -0
  116. package/dist/store/types.d.mts +85 -59
  117. package/dist/store/types.mjs +1 -0
  118. package/dist/store/utils.mjs +1 -1
  119. package/dist/store/view.mjs +1 -0
  120. package/dist/store.d.mts +3 -3
  121. package/dist/store.mjs +1 -1
  122. package/dist/vue-demi.d.mts +3 -3
  123. package/dist/vue-demi.mjs +1 -1
  124. package/package.json +29 -9
  125. package/dist/dev/store/define/optionsStyle.mjs +0 -117
  126. package/dist/dev/store/define/optionsStyle.mjs.map +0 -1
  127. package/dist/dev/store/define/setupStyle.mjs +0 -137
  128. package/dist/dev/store/define/setupStyle.mjs.map +0 -1
  129. package/dist/dev/store/define/shared.mjs +0 -81
  130. package/dist/dev/store/define/shared.mjs.map +0 -1
  131. package/dist/store/define/optionsStyle.mjs +0 -1
  132. package/dist/store/define/setupStyle.mjs +0 -1
  133. package/dist/store/define/shared.mjs +0 -1
@@ -1 +1 @@
1
- import{getMiniProgramPlatformByRuntimeGlobalKey as e,getMiniProgramRuntimeCapabilities as t,getMiniProgramRuntimeGlobalKey as n,getMiniProgramRuntimeGlobalKeys as r,getMiniProgramRuntimeHostConfigKey as i,resolveMiniProgramPlatform as a,supportsMiniProgramRuntimeCapability as o}from"@weapp-core/shared/platforms";const s=[`switchTab`,`reLaunch`,`redirectTo`,`navigateTo`,`navigateBack`];function c(){if(typeof globalThis<`u`)return globalThis}function l(){if(typeof my<`u`)return my}function u(){var t;let n=c(),i=(t=import.meta.env)==null?void 0:t.PLATFORM,o=a(i);if(o)return o;for(let t of r())if(n!=null&&n[t])return e(t)}function d(){return t(u())}function f(e){return o(u(),e)}function p(){var e,t,r,i;if(!f(`globalPageStack`))return[];let a=c(),o=u(),s=o?n(o):void 0,d=(e=(t=s?a==null||(r=a[s])==null?void 0:r.getCurrentPages:void 0)==null?(i=l())==null?void 0:i.getCurrentPages:t)==null?a==null?void 0:a.getCurrentPages:e;if(typeof d!=`function`)return[];try{let e=d();return Array.isArray(e)?e:[]}catch(e){return[]}}function m(){let e=c(),t=i(u()),n=e==null?void 0:e[t];return n&&typeof n==`object`?n:void 0}function h(e){var t;let i=c(),o=e==null?(t=import.meta.env)==null?void 0:t.PLATFORM:e,s=a(o);if(s){var u;let e=n(s);return(u=i==null?void 0:i[e])==null?s===`alipay`?l():void 0:u}for(let e of r()){let t=i==null?void 0:i[e];if(t)return t}}function g(){var e;return(e=h())==null?c():e}function _(){var e;return(e=g())==null||(e=e.console)==null?void 0:e.warn}function v(){if(!f(`globalRouterApi`))return;let e=h();if(!e)return;let t=Object.create(null);for(let n of s){let r=e[n];if(typeof r!=`function`)return;t[n]=(...t)=>r.apply(e,t)}return t}function y(){let e=m(),t=e==null?void 0:e.tabBar;if(!t||typeof t!=`object`||!(`list`in t)||!Array.isArray(t.list))return[];let n=[];for(let e of t.list){if(!e||typeof e!=`object`||!(`pagePath`in e))continue;let t=e.pagePath;typeof t==`string`&&t&&n.push(t.replace(/\.html$/,``))}return n}function b(){var e;return(e=h())==null?c():e}export{v as getCurrentMiniProgramGlobalRouter,m as getCurrentMiniProgramHostConfig,p as getCurrentMiniProgramPages,d as getCurrentMiniProgramRuntimeCapabilities,y as getCurrentMiniProgramTabBarPagePaths,h as getMiniProgramGlobalObject,_ as getMiniProgramRuntimeConsoleWarn,g as getMiniProgramRuntimeGlobalObject,b as getScopedSlotHostGlobalObject,u as resolveCurrentMiniProgramPlatform,f as supportsCurrentMiniProgramRuntimeCapability};
1
+ import{getMiniProgramPlatformByRuntimeGlobalKey as e,getMiniProgramRuntimeCapabilities as t,getMiniProgramRuntimeGlobalKey as n,getMiniProgramRuntimeGlobalKeys as r,getMiniProgramRuntimeHostConfigKey as i,resolveMiniProgramPlatform as a,supportsMiniProgramRuntimeCapability as o}from"@weapp-core/shared/platforms";const s=[`switchTab`,`reLaunch`,`redirectTo`,`navigateTo`,`navigateBack`];function c(){if(typeof globalThis<`u`)return globalThis}function l(e){switch(e){case`wx`:return typeof wx<`u`?wx:void 0;case`my`:return typeof my<`u`?my:void 0;case`tt`:return typeof tt<`u`?tt:void 0;case`swan`:return typeof swan<`u`?swan:void 0;case`jd`:return typeof jd<`u`?jd:void 0;case`xhs`:return typeof xhs<`u`?xhs:void 0}}function u(e){var t,n;return(t=(n=c())==null?void 0:n[e])==null?l(e):t}function d(){var t;let n=(t=import.meta.env)==null?void 0:t.PLATFORM,i=a(n);if(i)return i;for(let t of r())if(u(t))return e(t)}function f(){return t(d())}function p(e){return o(d(),e)}function m(e){var t;let i=e==null?(t=import.meta.env)==null?void 0:t.PLATFORM:e,o=a(i);if(o){var s;return(s=u(n(o)))==null?o===`tt`?u(`wx`):void 0:s}for(let e of r()){let t=u(e);if(t)return t}}function h(){var e,t;if(!p(`globalPageStack`))return[];let n=c(),r=m(),i=(e=(t=r==null?void 0:r.getCurrentPages)==null?n==null?void 0:n.getCurrentPages:t)==null?typeof getCurrentPages<`u`?getCurrentPages:void 0:e;if(typeof i!=`function`)return[];try{let e=i.call(r);return Array.isArray(e)?e:[]}catch(e){return[]}}function g(){let e=c(),t=i(d()),n=e==null?void 0:e[t];return n&&typeof n==`object`?n:void 0}function _(){var e;return(e=m())==null?c():e}function v(){var e;return(e=_())==null||(e=e.console)==null?void 0:e.warn}function y(){if(!p(`globalRouterApi`))return;let e=m();if(!e)return;let t=Object.create(null);for(let n of s){let r=e[n];if(typeof r!=`function`)return;t[n]=(...t)=>r.apply(e,t)}return t}function b(){let e=g(),t=e==null?void 0:e.tabBar;if(!t||typeof t!=`object`||!(`list`in t)||!Array.isArray(t.list))return[];let n=[];for(let e of t.list){if(!e||typeof e!=`object`||!(`pagePath`in e))continue;let t=e.pagePath;typeof t==`string`&&t&&n.push(t.replace(/\.html$/,``))}return n}function x(){var e;return(e=m())==null?c():e}export{y as getCurrentMiniProgramGlobalRouter,g as getCurrentMiniProgramHostConfig,h as getCurrentMiniProgramPages,f as getCurrentMiniProgramRuntimeCapabilities,b as getCurrentMiniProgramTabBarPagePaths,m as getMiniProgramGlobalObject,v as getMiniProgramRuntimeConsoleWarn,_ as getMiniProgramRuntimeGlobalObject,x as getScopedSlotHostGlobalObject,d as resolveCurrentMiniProgramPlatform,p as supportsCurrentMiniProgramRuntimeCapability};
@@ -0,0 +1 @@
1
+ function e(e,t){let n=`on${e.replace(/(^|-)([a-z0-9])/g,(e,t,n)=>n.toUpperCase())}`,r=this.props[n];if(typeof r!=`function`)return;let i={};for(let[e,t]of Object.entries(this.props))e.startsWith(`data-`)&&(i[e.slice(5)]=t);let a={id:this.props.id,dataset:i};return r({type:e,detail:t,target:a,currentTarget:a})}function t(t){let{lifetimes:n={},properties:r={},observers:i={},pageLifetimes:a={},...o}=t,s={};for(let[e,t]of Object.entries(r))s[e]=t&&typeof t==`object`&&`value`in t?t.value:null;return{...o,props:s,methods:{triggerEvent:e,...o.methods},onInit(){var e;this.properties=this.props,(e=n.created)==null||e.call(this)},didMount(){var e,t;this.properties=this.props,(e=n.attached)==null||e.call(this),(t=n.ready)==null||t.call(this)},deriveDataFromProps(e){var t,n;let a=(t=this.properties)==null?this.props:t;this.properties=e;for(let t of Object.keys(r))if(!Object.is(a==null?void 0:a[t],e[t])){var o;(o=i[t])==null||o.call(this,e[t],a==null?void 0:a[t])}(n=i[`**`])==null||n.call(this,e)},didUnmount(){var e;(e=n.detached)==null||e.call(this)},pageEvents:{onShow(){var e;(e=a.show)==null||e.call(this)},onHide(){var e;(e=a.hide)==null||e.call(this)}}}}export{t as createAlipayComponentDefinition};
@@ -1 +1 @@
1
- import{getMiniProgramRuntimeGlobalObject as e,resolveCurrentMiniProgramPlatform as t}from"../../platform.mjs";import{WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY as n}from"@weapp-core/constants";function r(e){let{lifetimes:t={},methods:n={},observers:r,options:i,pageLifetimes:a={},properties:o,...s}=e,c=s.onLoad;return{...s,...n,onLoad(...e){var n,r;(n=t.created)==null||n.apply(this,e);let i=c==null?void 0:c.apply(this,e);return(r=t.attached)==null||r.apply(this,e),i},onShow(...e){var t;return(t=a.show)==null?void 0:t.apply(this,e)},onReady(...e){var n;return(n=t.ready)==null?void 0:n.apply(this,e)},onHide(...e){var t;return(t=a.hide)==null?void 0:t.apply(this,e)},onResize(...e){var t;return(t=a.resize)==null?void 0:t.apply(this,e)},onUnload(...e){var n;return(n=t.detached)==null?void 0:n.apply(this,e)},onError(...e){var n;return(n=t.error)==null?void 0:n.apply(this,e)}}}function i(i,a){var o;let s=(o=e())==null?void 0:o[n];if(a&&t()===`alipay`){let e=r(i);if(typeof(s==null?void 0:s.Page)==`function`){s.Page(e);return}Page(e);return}if(typeof(s==null?void 0:s.Component)==`function`){s.Component(i);return}Component(i)}export{i as registerNativeComponentDefinition};
1
+ import{getMiniProgramRuntimeGlobalObject as e,resolveCurrentMiniProgramPlatform as t}from"../../platform.mjs";import{createAlipayComponentDefinition as n}from"./alipay.mjs";import{WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY as r}from"@weapp-core/constants";function i(e){let{lifetimes:t={},methods:n={},observers:r,options:i,pageLifetimes:a={},properties:o,...s}=e,c=s.onLoad;return{...s,...n,onLoad(...e){var n,r;this.options=e[0]&&typeof e[0]==`object`?e[0]:{},(n=t.created)==null||n.apply(this,e);let i=c==null?void 0:c.apply(this,e);return(r=t.attached)==null||r.apply(this,e),i},onShow(...e){var t;return(t=a.show)==null?void 0:t.apply(this,e)},onReady(...e){var n;return(n=t.ready)==null?void 0:n.apply(this,e)},onHide(...e){var t;return(t=a.hide)==null?void 0:t.apply(this,e)},onResize(...e){var t;return(t=a.resize)==null?void 0:t.apply(this,e)},onUnload(...e){var n;return(n=t.detached)==null?void 0:n.apply(this,e)},onError(...e){var n;return(n=t.error)==null?void 0:n.apply(this,e)}}}function a(a,o){var s;let c=(s=e())==null?void 0:s[r];if(o&&t()===`alipay`){let e=i(a);if(typeof(c==null?void 0:c.Page)==`function`){c.Page(e);return}Page(e);return}let l=t()===`alipay`?n(a):a;if(typeof(c==null?void 0:c.Component)==`function`){c.Component(l);return}Component(l)}export{a as registerNativeComponentDefinition};
@@ -1 +1 @@
1
- function e(e,t,n,r){return function(...i){let a=[],o=[],s=e=>a.push(e),c=e=>o.push(e);r.forEach(n=>{try{n({name:t,store:e,args:i,after:s,onError:c})}catch(e){}});let l;try{l=n.apply(e,i)}catch(e){throw o.forEach(t=>t(e)),e}let u=e=>(a.forEach(t=>t(e)),e);return l&&typeof l.then==`function`?l.then(e=>u(e),e=>(o.forEach(t=>t(e)),Promise.reject(e))):u(l)}}export{e as wrapAction};
1
+ import{setActivePinia as e}from"./manager.mjs";function t(t,n,r,i,a){return function(...o){e(a);let s=/* @__PURE__ */ new Set,c=/* @__PURE__ */ new Set;i.forEach(e=>e({name:n,store:t,args:o,after:e=>s.add(e),onError:e=>c.add(e)}));let l;try{l=r.apply(this&&this.$id===t.$id?this:t,o)}catch(e){throw c.forEach(t=>t(e)),e}return l instanceof Promise?l.then(e=>(s.forEach(t=>t(e)),e)).catch(e=>(c.forEach(t=>t(e)),Promise.reject(e))):(s.forEach(e=>e(l)),l)}}export{t as wrapAction};
@@ -1 +1 @@
1
- import{batch as e}from"../reactivity/core.mjs";import{isObject as t,mergeShallow as n}from"./utils.mjs";function r(r,i,a,o){let s={$id:r};Object.defineProperty(s,"$state",{get(){return i},set(e){i&&t(e)&&(n(i,e),a(`patch object`))}}),s.$patch=t=>{let r=typeof t==`function`?`patch function`:`patch object`;e(()=>{let e=i==null?s:i;typeof t==`function`?t(e):n(e,t)}),a(r)},o&&(s.$reset=()=>{e(o),a(`patch object`)});let c=/* @__PURE__ */ new Set;s.$subscribe=(e,t)=>(c.add(e),()=>c.delete(e));let l=/* @__PURE__ */ new Set;return s.$onAction=e=>(l.add(e),()=>l.delete(e)),{api:s,subs:c,actionSubs:l}}export{r as createBaseApi};
1
+ import{nextTick as e,queueJob as t}from"../scheduler.mjs";import{onScopeDispose as n,queueBatchCallback as r,track as i}from"../reactivity/core.mjs";import{toRaw as a}from"../reactivity/reactive/shared.mjs";import{isRef as o}from"../reactivity/ref.mjs";import{watch as s}from"../reactivity/watch.mjs";import{mergeState as c}from"./view.mjs";import{addSubscription as l,noop as u}from"./subscriptions.mjs";import{MutationType as d}from"./types.mjs";function f(e,t,n=/* @__PURE__ */ new Map){var r;if(!e||typeof e!=`object`||t<=0||((r=n.get(e))==null?0:r)>=t)return;if(n.set(e,t),o(e)){f(e.value,t,n);return}if(e.__r_skip)return;let s=a(e);i(s,Symbol.iterator),Array.isArray(e)&&i(s,`length`);for(let r of Object.keys(s))f(e[r],t-1,n)}function p(i,a,o,p){let m=/* @__PURE__ */ new Set,h=/* @__PURE__ */ new Set,g=/* @__PURE__ */ new Set,_=/* @__PURE__ */ new Set,v=!1,y=!1,b=!1,x=!1,S=0,C=!1;o.run(()=>n(()=>{m.clear(),h.clear(),g.clear(),_.clear()}));function w(){v&&(y=!0,g.forEach(e=>e.pause()))}function T(e){let t=!1,n;if(g.forEach(r=>{if(_.has(r)===e)try{r.resume()}catch(e){t||(n=e),t=!0}}),t)throw n}let E=()=>T(!1);function D(){try{T(!0)}finally{y=!1,t(E);let n=++S;x=!0;let r=()=>{S===n&&(b=!0)};e().then(r,r)}}let O={$id:i,$patch(e){b=x=!1,w();try{typeof e==`function`?e(a.state.value[i]):c(a.state.value[i],e)}finally{w(),r(D)}let t=typeof e==`function`?{type:d.patchFunction,storeId:i}:{type:d.patchObject,storeId:i,payload:e};m.forEach(e=>e(t,a.state.value[i]))},$subscribe(e,t={}){if(m.has(e))return u;let n=u,r,c=l(m,e,t.detached,()=>{r&&(g.delete(r),_.delete(r)),n()});return r=o.run(()=>s(()=>{let e=a.state.value[i];return t.deep===!1?e:(f(e,typeof t.deep==`number`?t.deep:1/0),{state:e})},n=>{(t.flush===`sync`?x:b)&&e({type:d.direct,storeId:i},t.deep===!1?n:n.state)},{...t,deep:!1})),r&&(n=r,g.add(r),(t.flush===`sync`||t.scheduler)&&_.add(r),y&&r.pause()),c},$onAction(e,t){return l(h,e,t)},$dispose(){if(!C){C=!0;try{o.stop()}finally{m.clear(),h.clear(),a._s.get(i)===p()&&a._s.delete(i)}}}};return Object.defineProperty(O,"$state",{configurable:!0,get:()=>a.state.value[i],set:e=>O.$patch(t=>Object.assign(t,e))}),{api:O,actionSubscriptions:h,activateSubscriptions(){v=!0,b=x=!0}}}export{p as createBaseApi};
@@ -0,0 +1 @@
1
+ import{effectScope as e}from"../../reactivity/core.mjs";import{isReactive as t}from"../../reactivity/reactive.mjs";import{isRef as n}from"../../reactivity/ref.mjs";import{computed as r,isComputedRef as i}from"../../reactivity/computed.mjs";import{toRef as a}from"../../reactivity/toRefs.mjs";import{mergeState as o,storeView as s}from"../view.mjs";import{setActivePinia as c}from"../manager.mjs";import{wrapAction as l}from"../actions.mjs";import{createBaseApi as u}from"../base.mjs";function d(d,f,p,m){let h=p._e.run(()=>e());if(!h)throw Error(`不能在已释放的 Pinia 上创建 Store`);let g=Object.prototype.hasOwnProperty.call(p.state.value,d),_=typeof f==`function`,v={},y=s(v),b=u(d,p,h,()=>y);Object.defineProperties(v,Object.getOwnPropertyDescriptors(b.api)),p._s.set(d,y);try{return h.run(()=>{var e;if(!g){var u,h;p.state.value[d]=s(_||(u=(h=f.state)==null?void 0:h.call(f))==null?{}:u)}let x=p.state.value[d],S=_?f():{},C=_?{...m,actions:{}}:{...f},w=_?C.actions:(e=f.actions)==null?{}:e;if(!_){var T;for(let e of Object.keys(x))S[e]=a(x,e);for(let[e,t]of Object.entries((T=f.getters)==null?{}:T))S[e]=r(()=>(c(p),t.call(y,y)));Object.assign(S,w)}v.$reset=_?()=>{}:()=>y.$patch(e=>{var t,n;return Object.assign(e,(t=(n=f.state)==null?void 0:n.call(f))==null?{}:t)});for(let e of Object.keys(S)){let r=S[e];typeof r==`function`?(w[e]=r,v[e]=l(y,e,r,b.actionSubscriptions,p)):(_&&(n(r)&&!i(r)||t(r))&&(g&&(n(r)?r.value=x[e]:o(s(r),x[e])),x[e]=r),v[e]=r)}for(let e of p._p){var E;Object.assign(y,(E=e({store:y,pinia:p,app:p._a,options:C}))==null?{}:E)}}),b.activateSubscriptions(),y}catch(e){try{h.stop()}catch(e){}throw p._s.get(d)===y&&p._s.delete(d),g||delete p.state.value[d],e}}export{d as createStoreInstance};
@@ -1,18 +1,7 @@
1
- import { ActionSubscriber, DefineStoreOptions, OptionsStore, StoreSubscribeOptions, SubscriptionCallback } from "./types.mjs";
1
+ import { DefineStoreOptions, OptionsStore, SetupStore, StoreDefinition, StoreSetupOptions } from "./types.mjs";
2
2
  //#region src/store/define.d.ts
3
- type SetupDefinition<T> = () => T;
4
- /**
5
- * @description 定义一个 setup 风格的 store
6
- */
7
- export declare function defineStore<T extends Record<string, any>>(id: string, setup: SetupDefinition<T>): () => T & {
8
- $id: string;
9
- $patch: (patch: Record<string, any> | ((state: any) => void)) => void;
10
- $reset: () => void;
11
- $subscribe: (cb: SubscriptionCallback<any>, opts?: StoreSubscribeOptions) => () => void;
12
- $onAction: (cb: ActionSubscriber<any>) => () => void;
13
- };
14
- /**
15
- * @description 定义一个 options 风格的 store
16
- */
17
- export declare function defineStore<S extends Record<string, any>, G extends Record<string, any>, A extends Record<string, any>>(id: string, options: DefineStoreOptions<S, G, A>): () => OptionsStore<S, G, A>;
3
+ /** 定义 Setup Store,返回值在实例上自动解包 ref。 */
4
+ export declare function defineStore<Id extends string, T extends Record<string, any>>(id: Id, setup: () => T, options?: StoreSetupOptions): StoreDefinition<Id, SetupStore<Id, T>>;
5
+ /** 定义 Options Store,共享 state/getters/actions 的 this 类型。 */
6
+ export declare function defineStore<Id extends string, S extends Record<string, any> = Record<never, never>, G extends Record<string, any> = Record<never, never>, A extends Record<string, any> = Record<never, never>>(id: Id, options: DefineStoreOptions<S, G, A>): StoreDefinition<Id, OptionsStore<S, G, A, Id>>;
18
7
  //#endregion
@@ -1 +1 @@
1
- import{effectScope as e}from"../reactivity/core.mjs";import{createOptionsStyleStore as t}from"./define/optionsStyle.mjs";import{createSetupStyleStore as n}from"./define/setupStyle.mjs";import{createStore as r}from"./manager.mjs";function i(i,a){let o,s=!1,c=r._instance;return function(){return s&&o?o:(s=!0,o=e(!0).run(()=>typeof a==`function`?n(i,a,c):t(i,a,c)),o)}}export{i as defineStore};
1
+ import{getActivePinia as e,setActivePinia as t}from"./manager.mjs";import{createStoreInstance as n}from"./define/create.mjs";function r(r,i,a){let o=o=>{let s=o==null?e():o;if(!s)throw Error(`没有活动的 Pinia,请先调用 app.use(createPinia()) 或显式传入 Pinia`);return t(s),s._s.has(r)||n(r,i,s,a),s._s.get(r)};return o.$id=r,o}export{r as defineStore};
@@ -1,7 +1,15 @@
1
- import { StoreManager } from "./types.mjs";
1
+ import { Pinia } from "./types.mjs";
2
2
  //#region src/store/manager.d.ts
3
- /**
4
- * @description 创建 store 管理器(插件与共享实例入口)
5
- */
6
- export declare function createStore(): StoreManager;
3
+ /** 设置组件外使用的活动 Store 管理器。 */
4
+ export declare function setActivePinia(pinia: Pinia): Pinia;
5
+ export declare function setActivePinia(pinia: undefined): undefined;
6
+ export declare function setActivePinia(pinia: Pinia | undefined): Pinia | undefined;
7
+ /** 优先读取当前应用的注入上下文,再读取活动管理器。 */
8
+ export declare function getActivePinia(): Pinia | undefined;
9
+ /** 创建独立的状态树与作用域;安装或显式激活后再使用 Store。 */
10
+ export declare function createPinia(): Pinia;
11
+ /** 保留原有创建名称,与推荐的 createPinia 是同一个函数。 */
12
+ export declare const createStore: typeof createPinia;
13
+ /** 释放整个管理器;与单个 Store 的 $dispose 不同,此操作也清除状态。 */
14
+ export declare function disposePinia(pinia: Pinia): void;
7
15
  //#endregion
@@ -1 +1 @@
1
- function e(){let t={_stores:/* @__PURE__ */ new Map,_plugins:[],install(e){},use(e){return typeof e==`function`&&t._plugins.push(e),t}};return e._instance=t,t}export{e as createStore};
1
+ import{effectScope as e}from"../reactivity/core.mjs";import{markRaw as t}from"../reactivity/reactive.mjs";import{ref as n}from"../reactivity/ref.mjs";import{hasInjectionContext as r,inject as i}from"../runtime/provide.mjs";import{storeView as a}from"./view.mjs";const o=Symbol(`wevu.pinia`);let s;function c(e){return s=e,e}function l(){return r()&&i(o,void 0)||s}function u(){let r=e(!0),i=[],s=[],l=/* @__PURE__ */ new Map,u=t({state:r.run(()=>n(a({}))),_e:r,_s:l,_p:i,_a:null,_stores:l,_plugins:i,install(e){c(u),u._a=e,e.provide(o,u),e.config.globalProperties.$pinia=u,i.push(...s.splice(0))},use(e){return(u._a?i:s).push(e),u}});return u}const d=u;function f(e){try{e._e.stop()}finally{e._s.clear(),e._p.splice(0),e.state.value={},e._a=null}}export{u as createPinia,d as createStore,f as disposePinia,l as getActivePinia,c as setActivePinia};
@@ -1,12 +1,10 @@
1
1
  import { Ref } from "../reactivity/ref.mjs";
2
+ import { ComputedRef } from "../reactivity/computed.mjs";
2
3
  import "../reactivity/index.mjs";
4
+ import { StoreApi } from "./types.mjs";
3
5
  //#region src/store/storeToRefs.d.ts
4
- /**
5
- * @description storeToRefs 返回类型推导
6
- */
7
- export type StoreToRefsResult<T extends Record<string, any>> = { [K in keyof T]: T[K] extends ((...args: any[]) => any) ? T[K] : T[K] extends Ref<infer V> ? Ref<V> : Ref<T[K]>; };
8
- /**
9
- * @description 将 store 状态转换为 Ref
10
- */
6
+ type IfEquals<X, Y, Yes, No> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? Yes : No;
7
+ /** 仅提取状态与 getter,保留 getter 的只读类型。 */
8
+ export type StoreToRefsResult<T extends Record<string, any>> = { [K in keyof T as K extends keyof StoreApi<any, any, any, any> ? never : T[K] extends ((...args: any[]) => any) ? never : K]: IfEquals<{ [P in K]: T[P]; }, { -readonly [P in K]: T[P]; }, Ref<T[K]>, ComputedRef<T[K]>>; };
11
9
  export declare function storeToRefs<T extends Record<string, any>>(store: T): StoreToRefsResult<T>;
12
10
  //#endregion
@@ -1 +1 @@
1
- import{isRef as e}from"../reactivity/ref.mjs";import{computed as t}from"../reactivity/computed.mjs";function n(n){let r={};for(let i in n){let a=n[i];if(typeof a==`function`){r[i]=a;continue}r[i]=e(a)?a:t({get:()=>n[i],set:e=>{n[i]=e}})}return r}export{n as storeToRefs};
1
+ import{isReactive as e}from"../reactivity/reactive.mjs";import{isRef as t}from"../reactivity/ref.mjs";import{isReadonly as n}from"../reactivity/readonly.mjs";import{computed as r,isComputedRef as i}from"../reactivity/computed.mjs";import{toRef as a}from"../reactivity/toRefs.mjs";import{rawStore as o}from"./view.mjs";function s(s){let c={};for(let[l,u]of Object.entries(o(s)))i(u)?c[l]=n(u)?r(()=>s[l]):r({get:()=>s[l],set:e=>s[l]=e}):(t(u)||e(u))&&(c[l]=a(s,l));return c}export{s as storeToRefs};
@@ -0,0 +1 @@
1
+ import{getCurrentScope as e,onScopeDispose as t}from"../reactivity/core.mjs";function n(){}function r(r,i,a=!1,o=n){r.add(i);let s=()=>{r.delete(i)&&o()};return!a&&e()&&t(s),s}export{r as addSubscription,n as noop};
@@ -1,79 +1,105 @@
1
+ import { Ref as Ref$1 } from "../reactivity/ref.mjs";
2
+ import { ComputedRef, WritableComputedRef } from "../reactivity/computed.mjs";
3
+ import { EffectScope } from "../reactivity/core.mjs";
4
+ import { WatchOptions } from "../reactivity/watch/types.mjs";
5
+ import "../reactivity/index.mjs";
6
+ import { UnwrapRef } from "vue";
1
7
  //#region src/store/types.d.ts
2
- /**
3
- * @description Store 变更类型
4
- */
5
- export type MutationType = 'patch object' | 'patch function' | 'direct';
6
- /**
7
- * @description Store 订阅回调签名
8
- */
8
+ /** 与 Pinia 一致的变更类型和值。 */
9
+ export declare const MutationType: {
10
+ readonly direct: "direct";
11
+ readonly patchObject: "patch object";
12
+ readonly patchFunction: "patch function";
13
+ };
14
+ export type MutationType = typeof MutationType[keyof typeof MutationType];
15
+ export type StateTree = Record<PropertyKey, any>;
16
+ export type DeepPartial<T> = { [K in keyof T]?: DeepPartial<T[K]>; };
17
+ export type SubscriptionCallbackMutation<S> = {
18
+ type: 'direct' | 'patch function';
19
+ storeId: string;
20
+ } | {
21
+ type: 'patch object';
22
+ storeId: string;
23
+ payload: DeepPartial<S>;
24
+ };
9
25
  export interface SubscriptionCallback<S = any> {
10
- (mutation: {
11
- type: MutationType;
12
- storeId: string;
13
- }, state: S): void;
26
+ (mutation: SubscriptionCallbackMutation<S>, state: S): void;
14
27
  }
15
- /**
16
- * @description Store 订阅选项
17
- */
18
- export interface StoreSubscribeOptions {
19
- /**
20
- * @description 是否在卸载后仍保留订阅(适用于跨页面生命周期的订阅)
21
- */
28
+ /** detached 订阅不随注册时的页面或组件作用域卸载。 */
29
+ export interface StoreSubscribeOptions extends WatchOptions<boolean> {
22
30
  detached?: boolean;
23
31
  }
24
- /**
25
- * @description Action 订阅回调上下文
26
- */
27
32
  export interface ActionContext<TStore = any, TResult = any> {
28
33
  name: string;
29
34
  store: TStore;
30
35
  args: any[];
31
- after: (cb: (result: TResult) => void) => void;
32
- onError: (cb: (error: any) => void) => void;
36
+ after: (callback: (result: TResult) => void) => void;
37
+ onError: (callback: (error: any) => void) => void;
33
38
  }
34
- /**
35
- * @description Action 订阅回调类型
36
- */
37
39
  export interface ActionSubscriber<TStore = any, TResult = any> {
38
40
  (context: ActionContext<TStore, TResult>): void;
39
41
  }
40
- /**
41
- * @description Store 管理器(插件与共享实例)
42
- */
43
- export interface StoreManager {
42
+ export interface PiniaPluginContext {
43
+ store: any;
44
+ pinia: Pinia;
45
+ app: any;
46
+ options: Record<string, any>;
47
+ }
48
+ export interface PiniaPlugin {
49
+ (context: PiniaPluginContext): Partial<PiniaCustomProperties> & Record<string, any> | void;
50
+ }
51
+ /** 应用的 Store 管理器,独立保存实例与状态。 */
52
+ export interface Pinia {
53
+ state: Ref$1<Record<string, StateTree>>;
44
54
  install: (app: any) => void;
55
+ use: (plugin: PiniaPlugin) => Pinia;
56
+ _e: EffectScope;
57
+ _s: Map<string, any>;
58
+ _p: PiniaPlugin[];
59
+ _a: any;
60
+ /** @deprecated 使用公开的 Pinia API。 */
45
61
  _stores: Map<string, any>;
46
- use: (plugin: (context: {
47
- store: any;
48
- }) => void) => StoreManager;
49
- _plugins: Array<(context: {
50
- store: any;
51
- }) => void>;
62
+ /** @deprecated 使用 use() 注册插件。 */
63
+ _plugins: PiniaPlugin[];
52
64
  }
53
- /**
54
- * @description Getter 定义集合
55
- */
56
- export type GetterTree<S extends Record<string, any>> = Record<string, (state: S) => any>;
57
- /**
58
- * @description 从 Getter 定义中推导返回类型
59
- */
60
- export type StoreGetters<G extends GetterTree<any>> = { [K in keyof G]: G[K] extends ((...args: any[]) => infer R) ? R : never; };
61
- type ActionResult<A> = Awaited<ReturnType<Extract<A[keyof A], (...args: any[]) => any>>>;
62
- /** 选项式 Store 的完整实例,供外部调用及 action/getter 的 this 共享。 */
63
- export type OptionsStore<S extends Record<string, any>, G extends Record<string, any>, A extends Record<string, any>> = S & StoreGetters<G> & A & {
64
- $id: string;
65
- $state: S;
66
- $patch: (patch: Partial<S> | ((state: S) => void)) => void;
65
+ /** createStore 返回的管理器,与 Pinia 使用同一类型契约。 */
66
+ export type StoreManager = Pinia;
67
+ export interface PiniaCustomProperties {}
68
+ export interface PiniaCustomStateProperties<S extends StateTree = StateTree> {}
69
+ export interface StoreDefinition<Id extends string = string, T = any> {
70
+ (pinia?: Pinia | null): T;
71
+ $id: Id;
72
+ }
73
+ export interface StoreSetupOptions {
74
+ [key: string]: any;
75
+ }
76
+ export type StoreGetters<G> = { readonly [K in keyof G]: G[K] extends ((...args: any[]) => infer R) ? R : never; };
77
+ /** 通过 action 名称同时收窄参数与异步解包后的返回值。 */
78
+ type StoreActionContext<TStore, A> = { [K in keyof A]: A[K] extends ((...args: infer Args) => infer Result) ? Omit<ActionContext<TStore, Awaited<Result>>, 'name' | 'args'> & {
79
+ name: K;
80
+ args: Args;
81
+ } : never; }[keyof A];
82
+ export interface StoreApi<Id extends string, S, TStore, A> {
83
+ $id: Id;
84
+ $state: keyof PiniaCustomStateProperties extends never ? S : S & PiniaCustomStateProperties;
85
+ $patch: (patch: DeepPartial<S> | ((state: S) => void)) => void;
67
86
  $reset: () => void;
68
- $subscribe: (cb: SubscriptionCallback<S>, opts?: StoreSubscribeOptions) => () => void;
69
- $onAction: (cb: ActionSubscriber<OptionsStore<S, G, A>, ActionResult<A>>) => () => void;
70
- };
71
- /**
72
- * @description defineStore(options) 的配置类型
73
- */
74
- export interface DefineStoreOptions<S extends Record<string, any>, G extends GetterTree<S>, A extends Record<string, any>> {
75
- state: () => S;
76
- getters?: G & Record<string, (state: S) => any> & ThisType<OptionsStore<S, G, A>>;
87
+ $subscribe: (callback: SubscriptionCallback<S>, options?: StoreSubscribeOptions) => () => void;
88
+ $onAction: (callback: (context: StoreActionContext<TStore, A>) => void, detached?: boolean) => () => void;
89
+ $dispose: () => void;
90
+ }
91
+ export type OptionsStore<S extends Record<string, any>, G extends Record<string, any>, A extends Record<string, any>, Id extends string = string> = UnwrapRef<S> & StoreGetters<G> & A & PiniaCustomProperties & PiniaCustomStateProperties<S> & StoreApi<Id, UnwrapRef<S>, OptionsStore<S, G, A, Id>, A>;
92
+ export interface DefineStoreOptions<S extends Record<string, any>, G extends Record<string, any>, A extends Record<string, any>> {
93
+ state?: () => S;
94
+ getters?: G & Record<string, (state: UnwrapRef<S>) => any> & ThisType<OptionsStore<S, G, A>>;
77
95
  actions?: A & ThisType<OptionsStore<S, G, A>>;
96
+ [key: string]: any;
78
97
  }
98
+ type SetupActions<T> = { [K in keyof T as T[K] extends ((...args: any[]) => any) ? K : never]: T[K]; };
99
+ type SetupState<T> = { [K in keyof T as T[K] extends ComputedRef<any> | WritableComputedRef<any> | ((...args: any[]) => any) ? never : K]: UnwrapRef<T[K]>; };
100
+ type SetupValues<T> = { [K in keyof T as T[K] extends ComputedRef<any> ? never : K]: UnwrapRef<T[K]>; } & { readonly [K in keyof T as T[K] extends ComputedRef<any> ? K : never]: UnwrapRef<T[K]>; };
101
+ export type SetupStore<Id extends string, T extends Record<string, any>> = SetupValues<T> & PiniaCustomProperties & StoreApi<Id, SetupState<T>, SetupStore<Id, T>, SetupActions<T>>;
102
+ export type StoreGeneric = Record<string, any> & StoreApi<string, any, any, any>;
103
+ export type StoreState<T extends StoreGeneric> = T['$state'];
104
+ export type StoreActions<T extends StoreGeneric> = SetupActions<Omit<T, keyof StoreApi<any, any, any, any>>>;
79
105
  //#endregion
@@ -0,0 +1 @@
1
+ const e={direct:`direct`,patchObject:`patch object`,patchFunction:`patch function`};export{e as MutationType};
@@ -1 +1 @@
1
- function e(e){return typeof e==`object`&&!!e}function t(t){if(!e(t))return!1;let n=Object.getPrototypeOf(t);return n===Object.prototype||n===null}function n(e,t){for(let n in t)e[n]=t[n]}function r(e){if(Array.isArray(e))return e.map(e=>r(e));if(t(e)){let t={};for(let n in e)t[n]=r(e[n]);return t}return e}function i(n,a){if(Array.isArray(n)&&Array.isArray(a)){n.length=0,a.forEach((e,t)=>{n[t]=r(e)});return}if(e(a)){for(let e in n)e in a||delete n[e];for(let e in a){let o=a[e],s=n[e];if(Array.isArray(o)&&Array.isArray(s)){i(s,o);continue}if(t(o)&&t(s)){i(s,o);continue}n[e]=r(o)}}}export{r as cloneDeep,e as isObject,t as isPlainObject,n as mergeShallow,i as resetObject};
1
+ function e(e){return typeof e==`object`&&!!e}function t(t){if(!e(t))return!1;let n=Object.getPrototypeOf(t);return n===Object.prototype||n===null}export{e as isObject,t as isPlainObject};
@@ -0,0 +1 @@
1
+ import{toRaw as e}from"../reactivity/reactive/shared.mjs";import{isShallowReactive as t}from"../reactivity/reactive/shallow.mjs";import{isReactive as n,reactive as r}from"../reactivity/reactive.mjs";import{isRef as i}from"../reactivity/ref.mjs";import{isPlainObject as a}from"./utils.mjs";const o=/* @__PURE__ */ new WeakMap;function s(e){if(e.__r_skip||!a(e)&&!Array.isArray(e)||n(e)&&t(e))return e;let c=n(e)?e:r(e),l=o.get(c);if(l)return l;let u=e=>n(e)?s(e):e,d=new Proxy(c,{get(e,t,n){let r=Reflect.get(e,t,n);return t===`__r_raw`||t===`__r_skip`?r:i(r)?Array.isArray(e)&&typeof t==`string`&&/^\d+$/.test(t)?r:u(r.value):u(r)},set(e,t,n,r){let a=Reflect.get(e,t,r);return i(a)&&!i(n)&&!Array.isArray(e)?(a.value=n,!0):Reflect.set(e,t,n,r)}});return o.set(c,d),o.set(d,d),d}function c(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(t=>e.add(t));for(let r of Object.keys(t==null?{}:t)){if(r===`__proto__`||r===`constructor`||r===`prototype`)continue;let o=t[r];a(e[r])&&a(o)&&!i(o)&&!n(o)?c(e[r],o):e[r]=o}}function l(t){return e(t)}export{c as mergeState,l as rawStore,s as storeView};
package/dist/store.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { ActionContext, ActionSubscriber, DefineStoreOptions, MutationType, StoreManager, StoreSubscribeOptions, SubscriptionCallback } from "./store/types.mjs";
1
+ import { ActionContext, ActionSubscriber, DefineStoreOptions, MutationType, Pinia, PiniaCustomProperties, PiniaCustomStateProperties, PiniaPlugin, PiniaPluginContext, StateTree, StoreActions, StoreDefinition, StoreGeneric, StoreManager, StoreState, StoreSubscribeOptions, SubscriptionCallback, SubscriptionCallbackMutation } from "./store/types.mjs";
2
2
  import { defineStore } from "./store/define.mjs";
3
- import { createStore } from "./store/manager.mjs";
3
+ import { createPinia, createStore, disposePinia, getActivePinia, setActivePinia } from "./store/manager.mjs";
4
4
  import { StoreToRefsResult, storeToRefs } from "./store/storeToRefs.mjs";
5
- export { type ActionContext, type ActionSubscriber, type DefineStoreOptions, type MutationType, type StoreManager, type StoreSubscribeOptions, type StoreToRefsResult, type SubscriptionCallback, createStore, defineStore, storeToRefs };
5
+ export { type ActionContext, type ActionSubscriber, type DefineStoreOptions, MutationType, type Pinia, type PiniaCustomProperties, type PiniaCustomStateProperties, type PiniaPlugin, type PiniaPluginContext, type StateTree, type StoreActions, type StoreDefinition, type StoreGeneric, type StoreManager, type StoreState, type StoreSubscribeOptions, type StoreToRefsResult, type SubscriptionCallback, type SubscriptionCallbackMutation, createPinia, createStore, defineStore, disposePinia, getActivePinia, setActivePinia, storeToRefs };
package/dist/store.mjs CHANGED
@@ -1 +1 @@
1
- import{createStore as e}from"./store/manager.mjs";import{defineStore as t}from"./store/define.mjs";import{storeToRefs as n}from"./store/storeToRefs.mjs";export{e as createStore,t as defineStore,n as storeToRefs};
1
+ import{createPinia as e,createStore as t,disposePinia as n,getActivePinia as r,setActivePinia as i}from"./store/manager.mjs";import{MutationType as a}from"./store/types.mjs";import{defineStore as o}from"./store/define.mjs";import{storeToRefs as s}from"./store/storeToRefs.mjs";export{a as MutationType,e as createPinia,t as createStore,o as defineStore,n as disposePinia,r as getActivePinia,i as setActivePinia,s as storeToRefs};
@@ -58,9 +58,9 @@ import { useNativePageRouter, useNativeRouter } from "./runtime/vueCompat/router
58
58
  import { TemplateRef, useTemplateRef } from "./runtime/vueCompat/templateRef.mjs";
59
59
  import { ComponentTypeEmits, EmitFn, EmitsOptions } from "./macros/shared.mjs";
60
60
  import { DefineModelModifiers, DefineModelTransformOptions, ModelRef, PageLayoutMeta, PageMeta, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, withDefaults } from "./macros.mjs";
61
- import { ActionContext, ActionSubscriber, DefineStoreOptions, MutationType, StoreManager, StoreSubscribeOptions, SubscriptionCallback } from "./store/types.mjs";
61
+ import { ActionContext, ActionSubscriber, DefineStoreOptions, MutationType, Pinia, PiniaCustomProperties, PiniaCustomStateProperties, PiniaPlugin, PiniaPluginContext, StateTree, StoreActions, StoreDefinition, StoreGeneric, StoreManager, StoreState, StoreSubscribeOptions, SubscriptionCallback, SubscriptionCallbackMutation } from "./store/types.mjs";
62
62
  import { defineStore } from "./store/define.mjs";
63
- import { createStore } from "./store/manager.mjs";
63
+ import { createPinia, createStore, disposePinia, getActivePinia, setActivePinia } from "./store/manager.mjs";
64
64
  import { StoreToRefsResult, storeToRefs } from "./store/storeToRefs.mjs";
65
65
  import { version } from "./version.mjs";
66
66
  import "./index.mjs";
@@ -83,4 +83,4 @@ export declare const Vue2: undefined;
83
83
  */
84
84
  export declare function install(): void;
85
85
  //#endregion
86
- 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, type MutationType, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, NavigationBarMetrics, type ObjectDirective, type OnCleanup, type PageFeatures, PageLayoutMeta, type PageLayoutState, PageMeta, PageStackSnapshot, 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 StoreManager, type StoreSubscribeOptions, type StoreToRefsResult, type SubscriptionCallback, 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, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, defineStore, effect, effectScope, endBatch, 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, 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 };
86
+ 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 };
package/dist/vue-demi.mjs CHANGED
@@ -1 +1 @@
1
- import{nextTick as e}from"./scheduler.mjs";import{batch as t,effect as n,effectScope as r,endBatch as i,getCurrentScope as a,onScopeDispose as o,startBatch as s,stop as c}from"./reactivity/core.mjs";import{addMutationRecorder as l,removeMutationRecorder as u}from"./reactivity/reactive/mutation.mjs";import{toRaw as d}from"./reactivity/reactive/shared.mjs";import{prelinkReactiveTree as f,touchReactive as p}from"./reactivity/reactive/patch.mjs";import{isShallowReactive as m,shallowReactive as h}from"./reactivity/reactive/shallow.mjs";import{getReactiveVersion as g,isRaw as _,isReactive as v,markRaw as y,reactive as b}from"./reactivity/reactive.mjs";import{customRef as x,isRef as S,ref as C,toValue as w,unref as T}from"./reactivity/ref.mjs";import{isProxy as E,isReadonly as D,readonly as O,shallowReadonly as k}from"./reactivity/readonly.mjs";import{useAsyncDerivation as A}from"./reactivity/asyncDerivation.mjs";import{computed as j}from"./reactivity/computed.mjs";import{isShallowRef as M,shallowRef as N,triggerRef as P}from"./reactivity/shallowRef.mjs";import{toRef as F,toRefs as I}from"./reactivity/toRefs.mjs";import{traverse as L}from"./reactivity/traverse.mjs";import{callHookList as R,callHookReturn as z,getCurrentInstance as B,getCurrentSetupContext as V,setCurrentInstance as H,setCurrentSetupContext as U}from"./runtime/hooks/base.mjs";import{onAddToFavorites as W,onAttached as G,onDetached as K,onError as q,onHide as J,onLaunch as Y,onLoad as X,onMemoryWarning as Z,onMoved as Q,onPageNotFound as $,onPageScroll as ee,onPullDownRefresh as te,onReachBottom as ne,onReady as re,onResize as ie,onRouteDone as ae,onSaveExitState as oe,onShareAppMessage as se,onShareTimeline as ce,onShow as le,onTabItemTap as ue,onThemeChange as de,onUnhandledRejection as fe,onUnload as pe}from"./runtime/hooks/register.mjs";import{callUpdateHooks as me,onActivated as he,onBeforeMount as ge,onBeforeUnmount as _e,onBeforeUpdate as ve,onDeactivated as ye,onErrorCaptured as be,onMounted as xe,onServerPrefetch as Se,onUnmounted as Ce,onUpdated as we}from"./runtime/hooks/vue.mjs";import{getDeepWatchStrategy as Te,setDeepWatchStrategy as Ee}from"./reactivity/watch/types.mjs";import{watch as De,watchEffect as Oe,watchPostEffect as ke,watchSyncEffect as Ae}from"./reactivity/watch.mjs";import{useCssModule as je}from"./runtime/css.mjs";import{resetWevuDefaults as Me}from"./runtime/defaults.mjs";import{useDisposables as Ne}from"./runtime/disposables.mjs";import{useElementIntersectionObserver as Pe}from"./runtime/elementIntersectionObserver.mjs";import{isNoSetData as Fe,markNoSetData as Ie}from"./runtime/noSetData.mjs";import{registerPageLayoutBridge as Le,registerRuntimeLayoutHosts as Re,resolveLayoutBridge as ze,resolveLayoutHost as Be,resolveRuntimePageLayoutName as Ve,setPageLayout as He,syncRuntimePageLayoutState as Ue,syncRuntimePageLayoutStateFromRuntime as We,unregisterPageLayoutBridge as Ge,unregisterRuntimeLayoutHosts as Ke,useLayoutBridge as qe,useLayoutHosts as Je,usePageLayout as Ye,waitForLayoutHost as Xe}from"./runtime/features/publicLayout.mjs";import{useIntersectionObserver as Ze}from"./runtime/intersectionObserver.mjs";import{getCurrentPageStackSnapshot as Qe,getNavigationBarMetrics as $e,useNavigationBarMetrics as et,usePageStack as tt}from"./runtime/pageEnvironment.mjs";import{usePageScrollThrottle as nt}from"./runtime/pageScroll.mjs";import{setGlobalProvidedValue as rt}from"./runtime/provideStore.mjs";import{hasInjectionContext as it,inject as at,injectGlobal as ot,provide as st,provideGlobal as ct}from"./runtime/provide.mjs";import{version as lt}from"./version.mjs";import{runSetupFunction as ut}from"./runtime/register/setup.mjs";import{setRuntimeSetDataVisibility as dt,teardownRuntimeInstance as ft}from"./runtime/register/runtimeInstance.mjs";import{createApp as pt,createWevuComponent as mt,createWevuScopedSlotComponent as ht,defineComponent as gt,mountRuntimeInstance as _t,registerApp as vt,registerComponent as yt,setWevuDefaults as bt}from"./runtime/publicRuntime.mjs";import{useAsyncPullDownRefresh as xt}from"./runtime/pullDownRefresh.mjs";import{useBoundingClientRect as St,useScrollOffset as Ct,useSelectorFields as wt,useSelectorQuery as Tt}from"./runtime/selectorQuery.mjs";import{normalizeClass as Et,normalizeStyle as Dt,resolvePropValue as Ot}from"./runtime/template.mjs";import{useUpdatePerformanceListener as kt}from"./runtime/updatePerformance.mjs";import{defineAppSetup as At,use as jt}from"./runtime/use.mjs";import{useAttrs as Mt,useNativeInstance as Nt,useSlots as Pt}from"./runtime/vueCompat/context.mjs";import{mergeModels as Ft,useBindModel as It,useChangeModel as Lt,useModel as Rt}from"./runtime/vueCompat/model.mjs";import{useNativePageRouter as zt,useNativeRouter as Bt}from"./runtime/vueCompat/router.mjs";import{useTemplateRef as Vt}from"./runtime/vueCompat/templateRef.mjs";import{createStore as Ht}from"./store/manager.mjs";import{defineStore as Ut}from"./store/define.mjs";import{storeToRefs as Wt}from"./store/storeToRefs.mjs";export*from"@wevu/web-apis";const Gt=!1,Kt=!0,qt=void 0;function Jt(){}export{qt as Vue2,l as addMutationRecorder,t as batch,R as callHookList,z as callHookReturn,me as callUpdateHooks,j as computed,pt as createApp,Ht as createStore,mt as createWevuComponent,ht as createWevuScopedSlotComponent,x as customRef,At as defineAppSetup,gt as defineComponent,Ut as defineStore,n as effect,r as effectScope,i as endBatch,B as getCurrentInstance,Qe as getCurrentPageStackSnapshot,a as getCurrentScope,V as getCurrentSetupContext,Te as getDeepWatchStrategy,$e as getNavigationBarMetrics,g as getReactiveVersion,it as hasInjectionContext,at as inject,ot as injectGlobal,Jt as install,Fe as isNoSetData,E as isProxy,_ as isRaw,v as isReactive,D as isReadonly,S as isRef,m as isShallowReactive,M as isShallowRef,Gt as isVue2,Kt as isVue3,Ie as markNoSetData,y as markRaw,Ft as mergeModels,_t as mountRuntimeInstance,e as nextTick,Et as normalizeClass,Dt as normalizeStyle,he as onActivated,W as onAddToFavorites,G as onAttached,ge as onBeforeMount,_e as onBeforeUnmount,ve as onBeforeUpdate,ye as onDeactivated,K as onDetached,q as onError,be as onErrorCaptured,J as onHide,Y as onLaunch,X as onLoad,Z as onMemoryWarning,xe as onMounted,Q as onMoved,$ as onPageNotFound,ee as onPageScroll,te as onPullDownRefresh,ne as onReachBottom,re as onReady,ie as onResize,ae as onRouteDone,oe as onSaveExitState,o as onScopeDispose,Se as onServerPrefetch,se as onShareAppMessage,ce as onShareTimeline,le as onShow,ue as onTabItemTap,de as onThemeChange,fe as onUnhandledRejection,pe as onUnload,Ce as onUnmounted,we as onUpdated,f as prelinkReactiveTree,st as provide,ct as provideGlobal,b as reactive,O as readonly,C as ref,vt as registerApp,yt as registerComponent,Le as registerPageLayoutBridge,Re as registerRuntimeLayoutHosts,u as removeMutationRecorder,Me as resetWevuDefaults,ze as resolveLayoutBridge,Be as resolveLayoutHost,Ot as resolvePropValue,Ve as resolveRuntimePageLayoutName,ut as runSetupFunction,H as setCurrentInstance,U as setCurrentSetupContext,Ee as setDeepWatchStrategy,rt as setGlobalProvidedValue,He as setPageLayout,dt as setRuntimeSetDataVisibility,bt as setWevuDefaults,h as shallowReactive,k as shallowReadonly,N as shallowRef,s as startBatch,c as stop,Wt as storeToRefs,Ue as syncRuntimePageLayoutState,We as syncRuntimePageLayoutStateFromRuntime,ft as teardownRuntimeInstance,d as toRaw,F as toRef,I as toRefs,w as toValue,p as touchReactive,L as traverse,P as triggerRef,T as unref,Ge as unregisterPageLayoutBridge,Ke as unregisterRuntimeLayoutHosts,jt as use,A as useAsyncDerivation,xt as useAsyncPullDownRefresh,Mt as useAttrs,It as useBindModel,St as useBoundingClientRect,Lt as useChangeModel,je as useCssModule,Ne as useDisposables,Pe as useElementIntersectionObserver,Ze as useIntersectionObserver,qe as useLayoutBridge,Je as useLayoutHosts,Rt as useModel,Nt as useNativeInstance,zt as useNativePageRouter,Bt as useNativeRouter,et as useNavigationBarMetrics,Ye as usePageLayout,nt as usePageScrollThrottle,tt as usePageStack,Ct as useScrollOffset,wt as useSelectorFields,Tt as useSelectorQuery,Pt as useSlots,Vt as useTemplateRef,kt as useUpdatePerformanceListener,lt as version,Xe as waitForLayoutHost,De as watch,Oe as watchEffect,ke as watchPostEffect,Ae as watchSyncEffect};
1
+ import{nextTick as e}from"./scheduler.mjs";import{batch as t,effect as n,effectScope as r,endBatch as i,getCurrentScope as a,onScopeDispose as o,startBatch as s,stop as c}from"./reactivity/core.mjs";import{addMutationRecorder as l,removeMutationRecorder as u}from"./reactivity/reactive/mutation.mjs";import{toRaw as d}from"./reactivity/reactive/shared.mjs";import{prelinkReactiveTree as f,touchReactive as p}from"./reactivity/reactive/patch.mjs";import{isShallowReactive as m,shallowReactive as h}from"./reactivity/reactive/shallow.mjs";import{getReactiveVersion as g,isRaw as _,isReactive as v,markRaw as y,reactive as b}from"./reactivity/reactive.mjs";import{customRef as x,isRef as S,ref as C,toValue as w,unref as T}from"./reactivity/ref.mjs";import{isProxy as E,isReadonly as D,readonly as O,shallowReadonly as k}from"./reactivity/readonly.mjs";import{useAsyncDerivation as A}from"./reactivity/asyncDerivation.mjs";import{computed as j}from"./reactivity/computed.mjs";import{isShallowRef as M,shallowRef as N,triggerRef as P}from"./reactivity/shallowRef.mjs";import{toRef as F,toRefs as I}from"./reactivity/toRefs.mjs";import{traverse as L}from"./reactivity/traverse.mjs";import{callHookList as R,callHookReturn as z,getCurrentInstance as B,getCurrentSetupContext as V,setCurrentInstance as H,setCurrentSetupContext as U}from"./runtime/hooks/base.mjs";import{onAddToFavorites as W,onAttached as G,onDetached as K,onError as q,onHide as J,onLaunch as Y,onLoad as X,onMemoryWarning as Z,onMoved as Q,onPageNotFound as $,onPageScroll as ee,onPullDownRefresh as te,onReachBottom as ne,onReady as re,onResize as ie,onRouteDone as ae,onSaveExitState as oe,onShareAppMessage as se,onShareTimeline as ce,onShow as le,onTabItemTap as ue,onThemeChange as de,onUnhandledRejection as fe,onUnload as pe}from"./runtime/hooks/register.mjs";import{callUpdateHooks as me,onActivated as he,onBeforeMount as ge,onBeforeUnmount as _e,onBeforeUpdate as ve,onDeactivated as ye,onErrorCaptured as be,onMounted as xe,onServerPrefetch as Se,onUnmounted as Ce,onUpdated as we}from"./runtime/hooks/vue.mjs";import{getDeepWatchStrategy as Te,setDeepWatchStrategy as Ee}from"./reactivity/watch/types.mjs";import{watch as De,watchEffect as Oe,watchPostEffect as ke,watchSyncEffect as Ae}from"./reactivity/watch.mjs";import{useCssModule as je}from"./runtime/css.mjs";import{resetWevuDefaults as Me}from"./runtime/defaults.mjs";import{useDisposables as Ne}from"./runtime/disposables.mjs";import{useElementIntersectionObserver as Pe}from"./runtime/elementIntersectionObserver.mjs";import{isNoSetData as Fe,markNoSetData as Ie}from"./runtime/noSetData.mjs";import{registerPageLayoutBridge as Le,registerRuntimeLayoutHosts as Re,resolveLayoutBridge as ze,resolveLayoutHost as Be,resolveRuntimePageLayoutName as Ve,setPageLayout as He,syncRuntimePageLayoutState as Ue,syncRuntimePageLayoutStateFromRuntime as We,unregisterPageLayoutBridge as Ge,unregisterRuntimeLayoutHosts as Ke,useLayoutBridge as qe,useLayoutHosts as Je,usePageLayout as Ye,waitForLayoutHost as Xe}from"./runtime/features/publicLayout.mjs";import{useIntersectionObserver as Ze}from"./runtime/intersectionObserver.mjs";import{getCurrentPageStackSnapshot as Qe,getNavigationBarMetrics as $e,useNavigationBarMetrics as et,usePageStack as tt}from"./runtime/pageEnvironment.mjs";import{usePageScrollThrottle as nt}from"./runtime/pageScroll.mjs";import{setGlobalProvidedValue as rt}from"./runtime/provideStore.mjs";import{hasInjectionContext as it,inject as at,injectGlobal as ot,provide as st,provideGlobal as ct}from"./runtime/provide.mjs";import{version as lt}from"./version.mjs";import{runSetupFunction as ut}from"./runtime/register/setup.mjs";import{setRuntimeSetDataVisibility as dt,teardownRuntimeInstance as ft}from"./runtime/register/runtimeInstance.mjs";import{createApp as pt,createWevuComponent as mt,createWevuScopedSlotComponent as ht,defineComponent as gt,mountRuntimeInstance as _t,registerApp as vt,registerComponent as yt,setWevuDefaults as bt}from"./runtime/publicRuntime.mjs";import{useAsyncPullDownRefresh as xt}from"./runtime/pullDownRefresh.mjs";import{useBoundingClientRect as St,useScrollOffset as Ct,useSelectorFields as wt,useSelectorQuery as Tt}from"./runtime/selectorQuery.mjs";import{normalizeClass as Et,normalizeStyle as Dt,resolvePropValue as Ot}from"./runtime/template.mjs";import{useUpdatePerformanceListener as kt}from"./runtime/updatePerformance.mjs";import{defineAppSetup as At,use as jt}from"./runtime/use.mjs";import{useAttrs as Mt,useNativeInstance as Nt,useSlots as Pt}from"./runtime/vueCompat/context.mjs";import{mergeModels as Ft,useBindModel as It,useChangeModel as Lt,useModel as Rt}from"./runtime/vueCompat/model.mjs";import{useNativePageRouter as zt,useNativeRouter as Bt}from"./runtime/vueCompat/router.mjs";import{useTemplateRef as Vt}from"./runtime/vueCompat/templateRef.mjs";import{createPinia as Ht,createStore as Ut,disposePinia as Wt,getActivePinia as Gt,setActivePinia as Kt}from"./store/manager.mjs";import{MutationType as qt}from"./store/types.mjs";import{defineStore as Jt}from"./store/define.mjs";import{storeToRefs as Yt}from"./store/storeToRefs.mjs";export*from"@wevu/web-apis";const Xt=!1,Zt=!0,Qt=void 0;function $t(){}export{qt as MutationType,Qt as Vue2,l as addMutationRecorder,t as batch,R as callHookList,z as callHookReturn,me as callUpdateHooks,j as computed,pt as createApp,Ht as createPinia,Ut as createStore,mt as createWevuComponent,ht as createWevuScopedSlotComponent,x as customRef,At as defineAppSetup,gt as defineComponent,Jt as defineStore,Wt as disposePinia,n as effect,r as effectScope,i as endBatch,Gt as getActivePinia,B as getCurrentInstance,Qe as getCurrentPageStackSnapshot,a as getCurrentScope,V as getCurrentSetupContext,Te as getDeepWatchStrategy,$e as getNavigationBarMetrics,g as getReactiveVersion,it as hasInjectionContext,at as inject,ot as injectGlobal,$t as install,Fe as isNoSetData,E as isProxy,_ as isRaw,v as isReactive,D as isReadonly,S as isRef,m as isShallowReactive,M as isShallowRef,Xt as isVue2,Zt as isVue3,Ie as markNoSetData,y as markRaw,Ft as mergeModels,_t as mountRuntimeInstance,e as nextTick,Et as normalizeClass,Dt as normalizeStyle,he as onActivated,W as onAddToFavorites,G as onAttached,ge as onBeforeMount,_e as onBeforeUnmount,ve as onBeforeUpdate,ye as onDeactivated,K as onDetached,q as onError,be as onErrorCaptured,J as onHide,Y as onLaunch,X as onLoad,Z as onMemoryWarning,xe as onMounted,Q as onMoved,$ as onPageNotFound,ee as onPageScroll,te as onPullDownRefresh,ne as onReachBottom,re as onReady,ie as onResize,ae as onRouteDone,oe as onSaveExitState,o as onScopeDispose,Se as onServerPrefetch,se as onShareAppMessage,ce as onShareTimeline,le as onShow,ue as onTabItemTap,de as onThemeChange,fe as onUnhandledRejection,pe as onUnload,Ce as onUnmounted,we as onUpdated,f as prelinkReactiveTree,st as provide,ct as provideGlobal,b as reactive,O as readonly,C as ref,vt as registerApp,yt as registerComponent,Le as registerPageLayoutBridge,Re as registerRuntimeLayoutHosts,u as removeMutationRecorder,Me as resetWevuDefaults,ze as resolveLayoutBridge,Be as resolveLayoutHost,Ot as resolvePropValue,Ve as resolveRuntimePageLayoutName,ut as runSetupFunction,Kt as setActivePinia,H as setCurrentInstance,U as setCurrentSetupContext,Ee as setDeepWatchStrategy,rt as setGlobalProvidedValue,He as setPageLayout,dt as setRuntimeSetDataVisibility,bt as setWevuDefaults,h as shallowReactive,k as shallowReadonly,N as shallowRef,s as startBatch,c as stop,Yt as storeToRefs,Ue as syncRuntimePageLayoutState,We as syncRuntimePageLayoutStateFromRuntime,ft as teardownRuntimeInstance,d as toRaw,F as toRef,I as toRefs,w as toValue,p as touchReactive,L as traverse,P as triggerRef,T as unref,Ge as unregisterPageLayoutBridge,Ke as unregisterRuntimeLayoutHosts,jt as use,A as useAsyncDerivation,xt as useAsyncPullDownRefresh,Mt as useAttrs,It as useBindModel,St as useBoundingClientRect,Lt as useChangeModel,je as useCssModule,Ne as useDisposables,Pe as useElementIntersectionObserver,Ze as useIntersectionObserver,qe as useLayoutBridge,Je as useLayoutHosts,Rt as useModel,Nt as useNativeInstance,zt as useNativePageRouter,Bt as useNativeRouter,et as useNavigationBarMetrics,Ye as usePageLayout,nt as usePageScrollThrottle,tt as usePageStack,Ct as useScrollOffset,wt as useSelectorFields,Tt as useSelectorQuery,Pt as useSlots,Vt as useTemplateRef,kt as useUpdatePerformanceListener,lt as version,Xe as waitForLayoutHost,De as watch,Oe as watchEffect,ke as watchPostEffect,Ae as watchSyncEffect};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wevu",
3
3
  "type": "module",
4
- "version": "7.1.3",
4
+ "version": "7.2.0",
5
5
  "description": "Vue 3 风格的小程序运行时,包含响应式、diff+setData 与轻量状态管理",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -30,7 +30,9 @@
30
30
  ],
31
31
  "sideEffects": [
32
32
  "./dist/api/vitest/setup.mjs",
33
- "./dist/dev/api/vitest/setup.mjs"
33
+ "./dist/dev/api/vitest/setup.mjs",
34
+ "./dist/router/auto-routes.mjs",
35
+ "./dist/dev/router/auto-routes.mjs"
34
36
  ],
35
37
  "exports": {
36
38
  ".": {
@@ -144,6 +146,14 @@
144
146
  "default": "./dist/router.mjs"
145
147
  }
146
148
  },
149
+ "./router/auto-routes": {
150
+ "types": "./dist/router/auto-routes.d.mts",
151
+ "import": {
152
+ "types": "./dist/router/auto-routes.d.mts",
153
+ "development": "./dist/dev/router/auto-routes.mjs",
154
+ "default": "./dist/router/auto-routes.mjs"
155
+ }
156
+ },
147
157
  "./vue-demi": {
148
158
  "types": "./dist/vue-demi.d.mts",
149
159
  "import": {
@@ -236,6 +246,13 @@
236
246
  "default": "./dist/dev/router.mjs"
237
247
  }
238
248
  },
249
+ "./dev/router/auto-routes": {
250
+ "types": "./dist/router/auto-routes.d.mts",
251
+ "import": {
252
+ "types": "./dist/router/auto-routes.d.mts",
253
+ "default": "./dist/dev/router/auto-routes.mjs"
254
+ }
255
+ },
239
256
  "./dev/vue-demi": {
240
257
  "types": "./dist/vue-demi.d.mts",
241
258
  "import": {
@@ -274,21 +291,24 @@
274
291
  }
275
292
  },
276
293
  "dependencies": {
277
- "@weapp-core/constants": "0.2.4",
278
- "@weapp-core/shared": "3.2.3",
279
- "@weapp-core/types": "1.1.1",
280
- "@wevu/api": "0.3.3",
281
- "@wevu/compiler": "7.1.3",
282
- "@wevu/web-apis": "1.3.0",
294
+ "@weapp-core/constants": "0.2.6",
295
+ "@weapp-core/shared": "3.2.5",
296
+ "@weapp-core/types": "1.1.3",
297
+ "@wevu/api": "0.3.5",
298
+ "@wevu/compiler": "7.2.0",
299
+ "@wevu/web-apis": "1.3.2",
283
300
  "vue": "^3.5.43"
284
301
  },
302
+ "devDependencies": {
303
+ "pinia": "4.0.3"
304
+ },
285
305
  "scripts": {
286
306
  "dev": "tsdown -w",
287
307
  "build": "tsdown",
288
308
  "build:types": "tsdown --dts",
289
309
  "test": "vitest run",
290
310
  "test:dev": "vitest",
291
- "test:types": "pnpm build:types && tsd --files \"test-d/**/*.test-d.{ts,tsx}\"",
311
+ "test:types": "pnpm build:types && tsd --files \"test-d/**/*.test-d.{ts,tsx}\" && tsd --files \"test-d/router-named-map.test-types.ts\"",
292
312
  "typecheck": "tsc --noEmit",
293
313
  "release": "pnpm publish",
294
314
  "lint": "eslint .",