wevu 6.20.4 → 6.21.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 (48) hide show
  1. package/dist/dev/_virtual/{_@oxc-project_runtime@0.144.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/defineProperty.mjs +1 -1
  2. package/dist/dev/_virtual/{_@oxc-project_runtime@0.144.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/toPrimitive.mjs +1 -1
  3. package/dist/dev/_virtual/{_@oxc-project_runtime@0.144.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/toPropertyKey.mjs +1 -1
  4. package/dist/dev/_virtual/{_@oxc-project_runtime@0.144.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/typeof.mjs +1 -1
  5. package/dist/dev/internal-runtime.mjs +3 -3
  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/context.mjs +4 -0
  10. package/dist/dev/runtime/app/context.mjs.map +1 -1
  11. package/dist/dev/runtime/app.mjs +1 -1
  12. package/dist/dev/runtime/app.mjs.map +1 -1
  13. package/dist/dev/runtime/define/componentDefinition.mjs +25 -0
  14. package/dist/dev/runtime/define/componentDefinition.mjs.map +1 -0
  15. package/dist/dev/runtime/define/scopedSlotOptions.mjs +40 -1
  16. package/dist/dev/runtime/define/scopedSlotOptions.mjs.map +1 -1
  17. package/dist/dev/runtime/define.mjs +52 -24
  18. package/dist/dev/runtime/define.mjs.map +1 -1
  19. package/dist/dev/runtime/provideContext.mjs +2 -2
  20. package/dist/dev/runtime/provideContext.mjs.map +1 -1
  21. package/dist/dev/runtime/register/component/registerDefinition.mjs +6 -2
  22. package/dist/dev/runtime/register/component/registerDefinition.mjs.map +1 -1
  23. package/dist/dev/runtime/register/component.mjs +4 -3
  24. package/dist/dev/runtime/register/component.mjs.map +1 -1
  25. package/dist/index.d.mts +1 -1
  26. package/dist/internal-runtime.d.mts +3 -3
  27. package/dist/internal-runtime.mjs +1 -1
  28. package/dist/package.mjs +1 -1
  29. package/dist/reactivity/core.mjs +1 -1
  30. package/dist/reactivity/ref.mjs +1 -1
  31. package/dist/runtime/app/context.mjs +1 -1
  32. package/dist/runtime/app.mjs +1 -1
  33. package/dist/runtime/defaults.d.mts +2 -1
  34. package/dist/runtime/define/componentDefinition.mjs +1 -0
  35. package/dist/runtime/define/scopedSlotOptions.mjs +1 -1
  36. package/dist/runtime/define.d.mts +22 -1
  37. package/dist/runtime/define.mjs +1 -1
  38. package/dist/runtime/index.d.mts +1 -1
  39. package/dist/runtime/provideContext.mjs +1 -1
  40. package/dist/runtime/register/component/registerDefinition.mjs +1 -1
  41. package/dist/runtime/register/component.d.mts +3 -1
  42. package/dist/runtime/register/component.mjs +1 -1
  43. package/dist/vue-demi.d.mts +1 -1
  44. package/package.json +4 -4
  45. /package/dist/_virtual/{_@oxc-project_runtime@0.144.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/defineProperty.mjs +0 -0
  46. /package/dist/_virtual/{_@oxc-project_runtime@0.144.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/toPrimitive.mjs +0 -0
  47. /package/dist/_virtual/{_@oxc-project_runtime@0.144.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/toPropertyKey.mjs +0 -0
  48. /package/dist/_virtual/{_@oxc-project_runtime@0.144.0 → _@oxc-project_runtime@0.146.0}/helpers/esm/typeof.mjs +0 -0
@@ -1 +1 @@
1
- import{hasOwn as e}from"../../utils.mjs";import{cloneSnapshotValue as t,isDeepEqualValue as n}from"../app/setData/snapshot.mjs";import{resolveDatasetEventValue as r,runInlineExpression as i}from"../register/inline.mjs";import{getOwnerProxy as a,getOwnerSnapshot as o,getOwnerTarget as s,subscribeOwner as c}from"../scopedSlots.mjs";import{clearTemplateRefs as l,scheduleTemplateRefUpdate as u}from"../templateRefs.mjs";import{WEVU_INLINE_HANDLER as d,WEVU_INLINE_MAP_KEY as f,WEVU_OWNER_HANDLER as p,WEVU_PROPS_DERIVED_KEYS_KEY as m,WEVU_PUBLIC_RUNTIME_KEY as h,WEVU_SLOT_FUNCTION_TOKEN as g,WEVU_SLOT_OWNER_ID_KEY as _,WEVU_SLOT_OWNER_ID_PROP as v,WEVU_SLOT_OWNER_KEY as y,WEVU_SLOT_OWNER_PROXY_KEY as b,WEVU_SLOT_PROPS_DATA_KEY as x,WEVU_SLOT_PROPS_KEY as S,WEVU_SLOT_SCOPE_KEY as C,WEVU_TEMPLATE_REFS_KEY as w}from"@weapp-core/constants";const T=[_,v,b,y,x,S,C],E=/&amp;/g,D=/&quot;/g,O=/&#34;/g,k=/&apos;/g,A=/&#39;/g,j=/&lt;/g,M=/&gt;/g;function N(e){return e.replace(E,`&`).replace(D,`"`).replace(O,`"`).replace(k,`'`).replace(A,`'`).replace(j,`<`).replace(M,`>`)}function P(e){var t,n,i,a;let o=(t=(n=e==null||(i=e.currentTarget)==null?void 0:i.dataset)==null?e==null||(a=e.target)==null?void 0:a.dataset:n)==null?{}:t,s=r(o,`wvArgs`,e),c=[];if(Array.isArray(s))c=s;else if(typeof s==`string`)try{c=JSON.parse(s)}catch(e){try{c=JSON.parse(N(s))}catch(e){c=[]}}return Array.isArray(c)||(c=[]),c.map(t=>t===`$event`?e:t)}function F(e){if(!e||typeof e!=`object`)return{};if(Array.isArray(e)){let t={};for(let n=0;n<e.length;n+=2){let r=e[n];typeof r==`string`&&r&&(t[r]=e[n+1])}return t}return e}function I(e){return Array.isArray(e)&&e[0]===g&&typeof e[1]==`string`}function L(e,t){return(...n)=>{var r;let i=e==null||(r=e.selectOwnerComponent)==null?void 0:r.call(e),a=i==null?void 0:i[d];if(typeof a!=`function`)return;let o={wd:1,wi:t[1]},s=Array.isArray(t[2])?t[2]:[],c=Array.isArray(t[3])?t[3]:[];s.forEach((e,t)=>o[`wvS${t}`]=e),c.forEach((e,t)=>o[`wvI${t}`]=e);let l={type:`wv-slot-function`,detail:n,currentTarget:{dataset:o},target:{dataset:o}};return a.call(i,l)}}function R(e,t){return Object.fromEntries(Object.entries(t).map(([t,n])=>[t,I(n)?L(e,n):n]))}function z(e){var t,n,r,i;return(t=(n=e==null||(r=e.__wevu)==null?void 0:r.proxy)==null?e==null||(i=e[h])==null?void 0:i.proxy:n)==null?e:t}function B(e,t){if(!t||Object.keys(t).length===0)return;let n=z(e),r={};for(let[e,i]of Object.entries(t))try{let t;typeof i==`function`?t=i.call(n):typeof(i==null?void 0:i.get)==`function`&&(t=i.get.call(n)),t!==void 0&&(r[e]=t)}catch(e){}return r}function V(e){var t,n;e==null||(t=e.__wevu)==null||(n=t.__wevu_flushSetupSnapshotSync)==null||n.call(t)}function H(r,i,a){var o;V(r);let s=B(r,i);if(!s||typeof(r==null?void 0:r.setData)!=`function`)return;let c=e(r,`__wvScopedSlotComputedSnapshot`),l=(o=r.__wvScopedSlotComputedSnapshot)==null?{}:o,u={},d={};for(let[r,i]of Object.entries(s))u[r]=t(i),(a!=null&&a.force||!c||!e(l,r)||!n(l[r],i,20,{keys:1e4}))&&(d[r]=i);for(let t of Object.keys(l))e(s,t)||(d[t]=null);r.__wvScopedSlotComputedSnapshot=u,Object.keys(d).length>0&&r.setData(d)}function U(r,i){var a,o,s,c,l;let u=e(i==null?{}:i,C)?i[C]:r==null||(a=r.properties)==null?void 0:a[C],d=e(i==null?{}:i,S)?i[S]:r==null||(o=r.properties)==null?void 0:o[S],f=F(u),p=F(d),m={...f,...p},h=!e(r,`__wvSlotPropsSnapshot`)||!n((s=r.__wvSlotPropsSnapshot)==null?{}:s,m,20,{keys:1e4}),g=h||!r[x]?R(r,m):r[x];h&&(r.__wvSlotPropsSnapshot=t(m)),r[x]=g;let _=r==null||(c=r.__wevu)==null?void 0:c.state,v=!!(_&&typeof _==`object`&&(!e(_,x)||!n((l=_[x])==null?{}:l,m,20,{keys:1e4})));return _&&typeof _==`object`&&(_[x]=g),{merged:g,runtimeSnapshotChanged:v,snapshot:m,snapshotChanged:h}}function W(e,t,n){let{runtimeSnapshotChanged:r,snapshot:i,snapshotChanged:a}=U(e,n);(a||r)&&typeof(e==null?void 0:e.setData)==`function`&&e.setData({[x]:i}),a&&H(e,t)}function G(e,t){var n;let r=!1;e[b]!==t&&(e[b]=t,r=!0);let i=e==null?void 0:e.data;if(i&&typeof i==`object`&&i[b]!==t){try{Object.defineProperty(i,b,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(e){i[b]=t}r=!0}let a=e==null||(n=e.__wevu)==null?void 0:n.state;return a&&typeof a==`object`&&a[b]!==t&&(a[b]=t,r=!0),r}function K(r,i,a,o){var s;let c=G(r,a),{snapshotChanged:l}=U(r),u=i||{},d=!e(r,`__wvOwnerSnapshot`)||!n((s=r.__wvOwnerSnapshot)==null?{}:s,u,20,{keys:1e4});if(d){var f;r.__wvOwnerSnapshot=t(u),r[y]=u;let e=r==null||(f=r.__wevu)==null?void 0:f.state;e&&typeof e==`object`&&(e[y]=u)}d&&typeof(r==null?void 0:r.setData)==`function`&&r.setData({[y]:u}),(d||c||l)&&H(r,o)}function q(e,t,n){if(!t){typeof(e==null?void 0:e.__wvOwnerUnsub)==`function`&&e.__wvOwnerUnsub(),e.__wvOwnerUnsub=void 0,e.__wvOwnerBoundId=``,G(e,void 0);return}let r=(t,r)=>{K(e,t,r,n)};e.__wvOwnerBoundId!==t&&(typeof e.__wvOwnerUnsub==`function`&&e.__wvOwnerUnsub(),e.__wvOwnerBoundId=t,e.__wvOwnerUnsub=c(t,r));let i=o(t);i&&r(i,a(t))}function J(e){var t,n,r,i;return(t=(n=e==null||(r=e.properties)==null?void 0:r[v])==null?e==null||(i=e.properties)==null?void 0:i[_]:n)==null?``:t}function Y(e,t){W(e,t);let n=J(e);n&&q(e,n,t)}function X(){let e={[y]:{},[x]:{}};return Object.defineProperty(e,b,{value:void 0,configurable:!0,enumerable:!1,writable:!0}),e}function Z(e){let t=e==null?void 0:e.computed,n=e==null?void 0:e.templateRefs,a=e=>{let t=J(e);return t?s(t):void 0},o={options:{virtualHost:!0},setData:{omit:T},[m]:T,properties:{[v]:{type:String,value:``,observer(e){q(this,e||``,t)}},[_]:{type:String,value:``,observer(e){q(this,e||``,t)}},[S]:{type:null,value:null,observer(e){W(this,t,{[S]:e})}},[C]:{type:null,value:null,observer(e){W(this,t,{[C]:e})}}},data:X,lifetimes:{attached(){Y(this,t)},ready(){Y(this,t),H(this,t,{force:!0});let e=a(this);e&&u(this,void 0,e)},detached(){let e=a(this);e&&l(this,e),typeof this.__wvOwnerUnsub==`function`&&this.__wvOwnerUnsub(),this.__wvOwnerUnsub=void 0,this.__wvOwnerBoundId=``,G(this,void 0)}},methods:{[p](e){var t,n,a,o,s;let c=this[b],l=(t=this.__wevu)==null||(t=t.methods)==null?void 0:t[f],u=i(c,void 0,e,l);if(u!==void 0)return u;if(!c)return;let d=(n=(a=e==null||(o=e.currentTarget)==null?void 0:o.dataset)==null?e==null||(s=e.target)==null?void 0:s.dataset:a)==null?{}:n,p=r(d,`wvHandler`,e);if(typeof p!=`string`||!p)return;let m=c==null?void 0:c[p];if(typeof m!=`function`)return;let h=P(e);return m.apply(c,h)}}};return e!=null&&e.computed&&Object.keys(e.computed).length>0&&(o.computed=e.computed),e!=null&&e.inlineMap&&Object.keys(e.inlineMap).length>0&&(o.methods={...o.methods,[f]:e.inlineMap}),n!=null&&n.length&&(o[w]=n),o}export{Z as createScopedSlotOptions};
1
+ import{hasOwn as e}from"../../utils.mjs";import{cloneSnapshotValue as t,isDeepEqualValue as n}from"../app/setData/snapshot.mjs";import{resolveDatasetEventValue as r,runInlineExpression as i}from"../register/inline.mjs";import{getOwnerProxy as a,getOwnerSnapshot as o,getOwnerTarget as s,subscribeOwner as c}from"../scopedSlots.mjs";import{clearTemplateRefs as l,scheduleTemplateRefUpdate as u}from"../templateRefs.mjs";import{WEVU_INLINE_HANDLER as d,WEVU_INLINE_MAP_KEY as f,WEVU_OWNER_HANDLER as p,WEVU_PROPS_DERIVED_KEYS_KEY as m,WEVU_PUBLIC_RUNTIME_KEY as h,WEVU_SLOT_FUNCTION_TOKEN as g,WEVU_SLOT_OWNER_ID_KEY as _,WEVU_SLOT_OWNER_ID_PROP as v,WEVU_SLOT_OWNER_KEY as y,WEVU_SLOT_OWNER_PROXY_KEY as b,WEVU_SLOT_PROPS_DATA_KEY as x,WEVU_SLOT_PROPS_KEY as S,WEVU_SLOT_SCOPE_KEY as C,WEVU_TEMPLATE_REFS_KEY as w}from"@weapp-core/constants";const T=[_,v,b,y,x,S,C],E=/&amp;/g,D=/&quot;/g,O=/&#34;/g,k=/&apos;/g,A=/&#39;/g,j=/&lt;/g,M=/&gt;/g;function N(e){return e.replace(E,`&`).replace(D,`"`).replace(O,`"`).replace(k,`'`).replace(A,`'`).replace(j,`<`).replace(M,`>`)}function P(e){var t,n,i,a;let o=(t=(n=e==null||(i=e.currentTarget)==null?void 0:i.dataset)==null?e==null||(a=e.target)==null?void 0:a.dataset:n)==null?{}:t,s=r(o,`wvArgs`,e),c=[];if(Array.isArray(s))c=s;else if(typeof s==`string`)try{c=JSON.parse(s)}catch(e){try{c=JSON.parse(N(s))}catch(e){c=[]}}return Array.isArray(c)||(c=[]),c.map(t=>t===`$event`?e:t)}function F(e){if(!e||typeof e!=`object`)return{};if(Array.isArray(e)){let t={};for(let n=0;n<e.length;n+=2){let r=e[n];typeof r==`string`&&r&&(t[r]=e[n+1])}return t}return e}function I(e){return Array.isArray(e)&&e[0]===g&&typeof e[1]==`string`}function L(e,t){return(...n)=>{var r;let i=e==null||(r=e.selectOwnerComponent)==null?void 0:r.call(e),a=i==null?void 0:i[d];if(typeof a!=`function`)return;let o={wd:1,wi:t[1]},s=Array.isArray(t[2])?t[2]:[],c=Array.isArray(t[3])?t[3]:[];s.forEach((e,t)=>o[`wvS${t}`]=e),c.forEach((e,t)=>o[`wvI${t}`]=e);let l={type:`wv-slot-function`,detail:n,currentTarget:{dataset:o},target:{dataset:o}};return a.call(i,l)}}function R(e,t){return Object.fromEntries(Object.entries(t).map(([t,n])=>[t,I(n)?L(e,n):n]))}function z(e){var t,n,r,i;return(t=(n=e==null||(r=e.__wevu)==null?void 0:r.proxy)==null?e==null||(i=e[h])==null?void 0:i.proxy:n)==null?e:t}function B(e,t){if(!t||Object.keys(t).length===0)return;let n=z(e),r={};for(let[e,i]of Object.entries(t))try{let t;typeof i==`function`?t=i.call(n):typeof(i==null?void 0:i.get)==`function`&&(t=i.get.call(n)),t!==void 0&&(r[e]=t)}catch(e){}return r}function V(e){var t,n;e==null||(t=e.__wevu)==null||(n=t.__wevu_flushSetupSnapshotSync)==null||n.call(t)}function H(r,i,a){var o;V(r);let s=B(r,i);if(!s||typeof(r==null?void 0:r.setData)!=`function`)return;let c=e(r,`__wvScopedSlotComputedSnapshot`),l=(o=r.__wvScopedSlotComputedSnapshot)==null?{}:o,u={},d={};for(let[r,i]of Object.entries(s))u[r]=t(i),(a!=null&&a.force||!c||!e(l,r)||!n(l[r],i,20,{keys:1e4}))&&(d[r]=i);for(let t of Object.keys(l))e(s,t)||(d[t]=null);r.__wvScopedSlotComputedSnapshot=u,Object.keys(d).length>0&&r.setData(d)}function U(r,i){var a,o,s,c,l;let u=e(i==null?{}:i,C)?i[C]:r==null||(a=r.properties)==null?void 0:a[C],d=e(i==null?{}:i,S)?i[S]:r==null||(o=r.properties)==null?void 0:o[S],f=F(u),p=F(d),m={...f,...p},h=!e(r,`__wvSlotPropsSnapshot`)||!n((s=r.__wvSlotPropsSnapshot)==null?{}:s,m,20,{keys:1e4}),g=h||!r[x]?R(r,m):r[x];h&&(r.__wvSlotPropsSnapshot=t(m)),r[x]=g;let _=r==null||(c=r.__wevu)==null?void 0:c.state,v=!!(_&&typeof _==`object`&&(!e(_,x)||!n((l=_[x])==null?{}:l,m,20,{keys:1e4})));return _&&typeof _==`object`&&(_[x]=g),{merged:g,runtimeSnapshotChanged:v,snapshot:m,snapshotChanged:h}}function W(e,t,n){let{runtimeSnapshotChanged:r,snapshot:i,snapshotChanged:a}=U(e,n);(a||r)&&typeof(e==null?void 0:e.setData)==`function`&&e.setData({[x]:i}),a&&H(e,t)}function G(e,t){var n;let r=!1;e[b]!==t&&(e[b]=t,r=!0);let i=e==null?void 0:e.data;if(i&&typeof i==`object`&&i[b]!==t){try{Object.defineProperty(i,b,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(e){i[b]=t}r=!0}let a=e==null||(n=e.__wevu)==null?void 0:n.state;return a&&typeof a==`object`&&a[b]!==t&&(a[b]=t,r=!0),r}function K(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function q(e,n,r,i){if(typeof e==`function`){r[n]=e;return}if(typeof e!=`object`||!e)return e;if(i.has(e))return;if(Array.isArray(e)){i.add(e);let t=e.map((e,t)=>{let a=q(e,`${n}.${t}`,r,i);return a===void 0?null:a});return i.delete(e),t}if(!K(e))return t(e);i.add(e);let a={};for(let[t,o]of Object.entries(e)){let e=q(o,`${n}.${t}`,r,i);e!==void 0&&(a[t]=e)}return i.delete(e),a}function J(e){let t={},n=q(e,y,t,new WeakSet);return{[y]:n,...t}}function Y(r,i,a,o){var s;let c=G(r,a),{snapshotChanged:l}=U(r),u=i||{},d=!e(r,`__wvOwnerSnapshot`)||!n((s=r.__wvOwnerSnapshot)==null?{}:s,u,20,{keys:1e4});if(d){var f;r.__wvOwnerSnapshot=t(u),r[y]=u;let e=r==null||(f=r.__wevu)==null?void 0:f.state;e&&typeof e==`object`&&(e[y]=u)}d&&typeof(r==null?void 0:r.setData)==`function`&&r.setData(J(u)),(d||c||l)&&H(r,o)}function X(e,t,n){if(!t){typeof(e==null?void 0:e.__wvOwnerUnsub)==`function`&&e.__wvOwnerUnsub(),e.__wvOwnerUnsub=void 0,e.__wvOwnerBoundId=``,G(e,void 0);return}let r=(t,r)=>{Y(e,t,r,n)};e.__wvOwnerBoundId!==t&&(typeof e.__wvOwnerUnsub==`function`&&e.__wvOwnerUnsub(),e.__wvOwnerBoundId=t,e.__wvOwnerUnsub=c(t,r));let i=o(t);i&&r(i,a(t))}function Z(e){var t,n,r,i;return(t=(n=e==null||(r=e.properties)==null?void 0:r[v])==null?e==null||(i=e.properties)==null?void 0:i[_]:n)==null?``:t}function Q(e,t){W(e,t);let n=Z(e);n&&X(e,n,t)}function $(){let e={[y]:{},[x]:{}};return Object.defineProperty(e,b,{value:void 0,configurable:!0,enumerable:!1,writable:!0}),e}function ee(e){let t=e==null?void 0:e.computed,n=e==null?void 0:e.templateRefs,a=e=>{let t=Z(e);return t?s(t):void 0},o={options:{virtualHost:!0},setData:{omit:T},[m]:T,properties:{[v]:{type:String,value:``,observer(e){X(this,e||``,t)}},[_]:{type:String,value:``,observer(e){X(this,e||``,t)}},[S]:{type:null,value:null,observer(e){W(this,t,{[S]:e})}},[C]:{type:null,value:null,observer(e){W(this,t,{[C]:e})}}},data:$,lifetimes:{attached(){Q(this,t)},ready(){Q(this,t),H(this,t,{force:!0});let e=a(this);e&&u(this,void 0,e)},detached(){let e=a(this);e&&l(this,e),typeof this.__wvOwnerUnsub==`function`&&this.__wvOwnerUnsub(),this.__wvOwnerUnsub=void 0,this.__wvOwnerBoundId=``,G(this,void 0)}},methods:{[p](e){var t,n,a,o,s;let c=this[b],l=(t=this.__wevu)==null||(t=t.methods)==null?void 0:t[f],u=i(c,void 0,e,l);if(u!==void 0)return u;if(!c)return;let d=(n=(a=e==null||(o=e.currentTarget)==null?void 0:o.dataset)==null?e==null||(s=e.target)==null?void 0:s.dataset:a)==null?{}:n,p=r(d,`wvHandler`,e);if(typeof p!=`string`||!p)return;let m=c==null?void 0:c[p];if(typeof m!=`function`)return;let h=P(e);return m.apply(c,h)}}};return e!=null&&e.computed&&Object.keys(e.computed).length>0&&(o.computed=e.computed),e!=null&&e.inlineMap&&Object.keys(e.inlineMap).length>0&&(o.methods={...o.methods,[f]:e.inlineMap}),n!=null&&n.length&&(o[w]=n),o}export{ee as createScopedSlotOptions};
@@ -83,6 +83,27 @@ interface DefineComponentWithTypeProps<TypeProps> {
83
83
  */
84
84
  declare function defineComponent<TypeProps = any>(options: DefineComponentTypePropsOptions<TypeProps>): DefineComponentWithTypeProps<TypeProps>;
85
85
  declare function defineComponent<P extends ComponentPropsOptions = ComponentPropsOptions, D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, S extends Record<string, any> | void = Record<string, any> | void>(options: DefineComponentOptions<P, D, C, M, S>): WevuComponentConstructor<ResolveProps<P>, SetupBindings<S>, D, C, M> & ComponentDefinition<D, C, M>;
86
+ /**
87
+ * 创建不触发宿主全局注册的 Wevu 组件定义。
88
+ *
89
+ * @param options 组件选项
90
+ * @internal
91
+ */
92
+ declare function createWevuComponentDefinition(options: DefineComponentOptions<any, any, any, any, any>): WevuComponentConstructor<InferProps<ComponentPropsOptions>, Record<string, any>, Record<string, any>, ComputedDefinitions, MethodDefinitions> & ComponentDefinition<any, any, any>;
93
+ /**
94
+ * 从现有组件定义派生拥有独立应用上下文的组件定义。
95
+ *
96
+ * @param definition 已解析的 Wevu 组件定义
97
+ * @internal
98
+ */
99
+ declare function createIsolatedWevuComponentDefinition(definition: object): ComponentDefinition<any, any, any>;
100
+ /**
101
+ * 获取组件定义对应的宿主生命周期定义。
102
+ *
103
+ * @param definition Wevu 组件定义
104
+ * @internal
105
+ */
106
+ declare function getWevuComponentLifecycleDefinition(definition: object): Record<string, any> | undefined;
86
107
  /**
87
108
  * 从 Vue SFC 选项创建 wevu 组件,供 weapp-vite 编译产物直接调用的兼容入口。
88
109
  *
@@ -102,4 +123,4 @@ declare function createWevuScopedSlotComponent(overrides?: {
102
123
  templateRefs?: TemplateRefBinding[];
103
124
  }): void;
104
125
  //#endregion
105
- export { ComponentDefinition, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, SetupContextWithTypeProps, SetupFunctionWithTypeProps, WevuComponentConstructor, WevuDefinedComponent, createWevuComponent, createWevuScopedSlotComponent, defineComponent };
126
+ export { ComponentDefinition, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, SetupContextWithTypeProps, SetupFunctionWithTypeProps, WevuComponentConstructor, WevuDefinedComponent, createIsolatedWevuComponentDefinition, createWevuComponent, createWevuComponentDefinition, createWevuScopedSlotComponent, defineComponent, getWevuComponentLifecycleDefinition };
@@ -1 +1 @@
1
- import{getScopedSlotHostGlobalObject as e}from"./platform.mjs";import{hasOwn as t}from"../utils.mjs";import{INTERNAL_DEFAULTS_SCOPE_KEY as n,applyWevuComponentDefaults as r}from"./defaults.mjs";import{allocateOwnerId as i}from"./scopedSlots.mjs";import{runSetupFunction as a}from"./register/setup.mjs";import{registerComponent as o}from"./register/component.mjs";import{createApp as s}from"./app.mjs";import{resolveNativeInitialData as c}from"./define/initialComputed.mjs";import{resolveVueComponentOptions as l}from"./define/options.mjs";import{applyOptionsApiProvide as u,resolveOptionsApiInjections as d}from"./define/optionsApi.mjs";import{normalizeProps as f}from"./define/props.mjs";import{createScopedSlotOptions as p}from"./define/scopedSlotOptions.mjs";import{applySetupResult as m}from"./define/setupResult.mjs";import{WEVU_FUNCTION_PROP_PATHS_KEY as h,WEVU_SCOPED_SLOT_CREATOR_KEY as g,WEVU_SLOT_OWNER_ID_KEY as _,WEVU_SLOT_OWNER_ID_PROP as v,WEVU_SLOT_SCOPE_KEY as y}from"@weapp-core/constants";let b;function x(){let t=e();if(!t)return;let n=t;b&&n[g]!==b&&(n[g]=b)}function S(e,n){let r={...n==null?{}:n};if(!e||typeof e!=`object`)return r;for(let[n,i]of Object.entries(e))i&&typeof i==`object`&&t(i,`value`)&&(r[n]=i.value);return r}function C(e,t){return!!e.__wevu_isPage&&Array.isArray(t==null?void 0:t.pick)&&t.pick.includes(_)}function w(e){return Array.isArray(e==null?void 0:e.pick)&&e.pick.includes(_)}function T(e){let t=e.properties;return!!(t&&typeof t==`object`&&(v in t||y in t))}function E(e,t){return(t==null?void 0:t.strategy)!==`patch`||!T(e)?t:{...t,strategy:`diff`}}function D(e){x();let{__typeProps:t,data:p,computed:g,methods:v,setData:y,watch:b,setup:T,props:D,inject:O,provide:k,allowFunctionProps:A,...j}=l(r(e)),M=j[h],N=Array.isArray(M)?[...new Set(M.filter(e=>typeof e==`string`&&e.length>0))]:[];delete j[h];let P=E(j,A===!0?{...y==null?{}:y,includeFunctions:!0,functionPaths:N}:A===!1?y:N.length?{...y==null?{}:y,functionPaths:N}:y),F=new Set(N.filter(e=>!e.includes(`.`))),I=f(j,D),L=S(I.properties,v),R=typeof p==`function`?()=>p.call(L):p,z=s({data:R,computed:g,methods:v,setData:P,[n]:`component`}),B=typeof T==`function`||O!=null||k!=null?((e,t)=>{var n,r;let i=(n=(r=t==null?void 0:t.proxy)==null?t==null?void 0:t.instance:r)==null?Object.create(null):n,o=d(O,i);k!=null&&u(k,i);let s=typeof T==`function`?a(T,e,t):void 0,c={...o,...s==null?{}:s};return t&&Object.keys(c).length&&m(t.runtime,t.instance,c,{includeFunctionsInState:A===!0,functionPropPaths:A===!1?void 0:F}),c}):void 0,V=typeof R==`function`?R():R,H=w(P)?{...V&&typeof V==`object`?V:{},[_]:C(j,P)?(V==null?void 0:V[_])||i():(V==null?void 0:V[_])||``}:V,U=c(H,g,P,v),W=U===void 0?I:{...I,data:U},G={data:R,computed:g,methods:v,setData:P,watch:b,setup:B,mpOptions:W};return o(z,v==null?{}:v,b,B,W),{__wevu_runtime:z,__wevu_options:G}}function O(e){var t;x();let{properties:n,props:r,...i}=e,a={...i,allowNullPropInput:(t=i.allowNullPropInput)==null||t,__wevu_allowNullPropInput:!0};D(f(a,r,n))}function k(e){O(p(e))}b=k,x();export{O as createWevuComponent,k as createWevuScopedSlotComponent,D as defineComponent};
1
+ import{getScopedSlotHostGlobalObject as e}from"./platform.mjs";import{hasOwn as t}from"../utils.mjs";import{applyWevuComponentDefaults as n}from"./defaults.mjs";import{allocateOwnerId as r}from"./scopedSlots.mjs";import{runSetupFunction as i}from"./register/setup.mjs";import{createRuntimeComponentDefinition as a}from"./define/componentDefinition.mjs";import{resolveNativeInitialData as o}from"./define/initialComputed.mjs";import{resolveVueComponentOptions as s}from"./define/options.mjs";import{applyOptionsApiProvide as c,resolveOptionsApiInjections as l}from"./define/optionsApi.mjs";import{normalizeProps as u}from"./define/props.mjs";import{createScopedSlotOptions as d}from"./define/scopedSlotOptions.mjs";import{applySetupResult as f}from"./define/setupResult.mjs";import{WEVU_FUNCTION_PROP_PATHS_KEY as p,WEVU_SCOPED_SLOT_CREATOR_KEY as m,WEVU_SLOT_OWNER_ID_KEY as h,WEVU_SLOT_OWNER_ID_PROP as g,WEVU_SLOT_SCOPE_KEY as _}from"@weapp-core/constants";let v;const y=new WeakMap;function b(){let t=e();if(!t)return;let n=t;v&&n[m]!==v&&(n[m]=v)}function x(e,n){let r={...n==null?{}:n};if(!e||typeof e!=`object`)return r;for(let[n,i]of Object.entries(e))i&&typeof i==`object`&&t(i,`value`)&&(r[n]=i.value);return r}function S(e,t){return!!e.__wevu_isPage&&Array.isArray(t==null?void 0:t.pick)&&t.pick.includes(h)}function C(e){return Array.isArray(e==null?void 0:e.pick)&&e.pick.includes(h)}function w(e){let t=e.properties;return!!(t&&typeof t==`object`&&(g in t||_ in t))}function T(e,t){return(t==null?void 0:t.strategy)!==`patch`||!w(e)?t:{...t,strategy:`diff`}}function E(e,t=!1){let{lifecycleDefinition:n,runtimeApp:r}=a(e,t),i={__wevu_runtime:r,__wevu_options:e};return y.set(i,n),i}function D(e){return O(e,!0)}function O(e,t){t&&b();let{__typeProps:a,data:d,computed:m,methods:g,setData:_,watch:v,setup:y,props:w,inject:D,provide:O,allowFunctionProps:k,...A}=s(n(e)),j=A[p],M=Array.isArray(j)?[...new Set(j.filter(e=>typeof e==`string`&&e.length>0))]:[];delete A[p];let N=T(A,k===!0?{..._==null?{}:_,includeFunctions:!0,functionPaths:M}:k===!1?_:M.length?{..._==null?{}:_,functionPaths:M}:_),P=new Set(M.filter(e=>!e.includes(`.`))),F=u(A,w),I=x(F.properties,g),L=typeof d==`function`?()=>d.call(I):d,R=typeof y==`function`||D!=null||O!=null?((e,t)=>{var n,r;let a=(n=(r=t==null?void 0:t.proxy)==null?t==null?void 0:t.instance:r)==null?Object.create(null):n,o=l(D,a);O!=null&&c(O,a);let s=typeof y==`function`?i(y,e,t):void 0,u={...o,...s==null?{}:s};return t&&Object.keys(u).length&&f(t.runtime,t.instance,u,{includeFunctionsInState:k===!0,functionPropPaths:k===!1?void 0:P}),u}):void 0,z=typeof L==`function`?L():L,B=C(N)?{...z&&typeof z==`object`?z:{},[h]:S(A,N)?(z==null?void 0:z[h])||r():(z==null?void 0:z[h])||``}:z,V=o(B,m,N,g);return E({data:L,computed:m,methods:g,setData:N,watch:v,setup:R,mpOptions:V===void 0?F:{...F,data:V}},t)}function k(e){return O(e,!1)}function A(e){let t=e.__wevu_options;if(!t)throw TypeError(`无法从非 Wevu 组件定义创建独立运行时`);return E(t)}function j(e){return y.get(e)}function M(e){var t;b();let{properties:n,props:r,...i}=e,a={...i,allowNullPropInput:(t=i.allowNullPropInput)==null||t,__wevu_allowNullPropInput:!0};D(u(a,r,n))}function N(e){M(d(e))}v=N,b();export{A as createIsolatedWevuComponentDefinition,M as createWevuComponent,k as createWevuComponentDefinition,N as createWevuScopedSlotComponent,D as defineComponent,j as getWevuComponentLifecycleDefinition};
@@ -44,4 +44,4 @@ import { ModelModifiers, UseModelOptions, mergeModels, useBindModel, useChangeMo
44
44
  import { useNativePageRouter, useNativeRouter } from "./vueCompat/router.mjs";
45
45
  import { TemplateRef, useTemplateRef } from "./vueCompat/templateRef.mjs";
46
46
  import "./vueCompat.mjs";
47
- export { type AlipayMiniProgramHostNamespace, type AlipayMiniProgramHostSourceContract, type AllowedComponentProps, type AppConfig, type ComponentCustomProps, ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComputedDefinitions, type CreateAppOptions, type DataOption, type DefaultMiniProgramHostNamespace, type DefaultMiniProgramHostSourceContract, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, type DouyinMiniProgramHostNamespace, type DouyinMiniProgramHostSourceContract, ElementIntersectionObserverCallback, 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, LayoutBridgeInstance, LayoutHostBinding, type MethodDefinitions, type MiniProgramAdapter, type HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, type MiniProgramCSSProperties, 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 MiniProgramDatasetAttributes, type MiniProgramHostNamespace, type MiniProgramHostNamespaceBySource, type MiniProgramHostSourceName, type MiniProgramHostSourceRegistry, type MiniProgramHtmlAliasIntrinsicElements, type MiniProgramInstance, type HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, type MiniProgramIntrinsicElementBaseAttributes, type MiniProgramIntrinsicElements, type MiniProgramIntrinsicEventHandler, 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, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, NavigationBarMetrics, type ObjectDirective, type PageFeatures, PageLayoutState, PageStackSnapshot, type PropConstructor, type PropOptions, type PropType, type PublicProps, PullDownRefreshHandler, type RuntimeApp, type RuntimeInstance, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextNativeInstance, type SetupContextRouter, SetupContextWithTypeProps, type SetupFunction, SetupFunctionWithTypeProps, type ShallowUnwrapRef, type TemplateRef, TemplateRefValue, TemplateRefs, type HostMiniProgramTriggerEventOptions as TriggerEventOptions, type TtMiniProgramHostNamespace, type TtMiniProgramHostSourceContract, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseAsyncPullDownRefreshOptions, UseBoundingClientRectOptions, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, UseIntersectionObserverOptions, UseIntersectionObserverResult, type UseModelOptions, UseNavigationBarMetricsOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UsePageStackOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, UseUpdatePerformanceListenerStopHandle, type VNode, type VNodeProps, type WeappCSSProperties, type WeappDatasetAttributes, type WeappHtmlAliasIntrinsicElements, type WeappIntrinsicElementBaseAttributes, type WeappIntrinsicElements, type WeappIntrinsicEventHandler, type WechatMiniProgramHostNamespace, type WechatMiniProgramHostSourceContract, WevuComponentConstructor, type WevuDefaults, WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, WevuPageLayoutMap, type WevuPlugin, type WevuTypedRouterRouteMap, callHookList, callHookReturn, callUpdateHooks, createApp, createWevuComponent, createWevuScopedSlotComponent, defineAppSetup, defineComponent, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentSetupContext, getNavigationBarMetrics, hasInjectionContext, inject, injectGlobal, isNoSetData, markNoSetData, mergeModels, mountRuntimeInstance, 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, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, provide, provideGlobal, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, waitForLayoutHost };
47
+ export { type AlipayMiniProgramHostNamespace, type AlipayMiniProgramHostSourceContract, type AllowedComponentProps, type AppConfig, type ComponentCustomProps, type ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComputedDefinitions, type CreateAppOptions, type DataOption, type DefaultMiniProgramHostNamespace, type DefaultMiniProgramHostSourceContract, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, type DefineComponentTypePropsOptions, type DefineComponentWithTypeProps, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, type DouyinMiniProgramHostNamespace, type DouyinMiniProgramHostSourceContract, ElementIntersectionObserverCallback, 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, LayoutBridgeInstance, LayoutHostBinding, type MethodDefinitions, type MiniProgramAdapter, type HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, type MiniProgramCSSProperties, 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 MiniProgramDatasetAttributes, type MiniProgramHostNamespace, type MiniProgramHostNamespaceBySource, type MiniProgramHostSourceName, type MiniProgramHostSourceRegistry, type MiniProgramHtmlAliasIntrinsicElements, type MiniProgramInstance, type HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, type MiniProgramIntrinsicElementBaseAttributes, type MiniProgramIntrinsicElements, type MiniProgramIntrinsicEventHandler, 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, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, NavigationBarMetrics, type ObjectDirective, type PageFeatures, PageLayoutState, PageStackSnapshot, type PropConstructor, type PropOptions, type PropType, type PublicProps, PullDownRefreshHandler, type RuntimeApp, type RuntimeInstance, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextNativeInstance, type SetupContextRouter, type SetupContextWithTypeProps, type SetupFunction, type SetupFunctionWithTypeProps, type ShallowUnwrapRef, type TemplateRef, TemplateRefValue, TemplateRefs, type HostMiniProgramTriggerEventOptions as TriggerEventOptions, type TtMiniProgramHostNamespace, type TtMiniProgramHostSourceContract, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseAsyncPullDownRefreshOptions, UseBoundingClientRectOptions, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, UseIntersectionObserverOptions, UseIntersectionObserverResult, type UseModelOptions, UseNavigationBarMetricsOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UsePageStackOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, UseUpdatePerformanceListenerStopHandle, type VNode, type VNodeProps, type WeappCSSProperties, type WeappDatasetAttributes, type WeappHtmlAliasIntrinsicElements, type WeappIntrinsicElementBaseAttributes, type WeappIntrinsicElements, type WeappIntrinsicEventHandler, type WechatMiniProgramHostNamespace, type WechatMiniProgramHostSourceContract, type WevuComponentConstructor, type WevuDefaults, type WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, WevuPageLayoutMap, type WevuPlugin, type WevuTypedRouterRouteMap, callHookList, callHookReturn, callUpdateHooks, createApp, createWevuComponent, createWevuScopedSlotComponent, defineAppSetup, defineComponent, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentSetupContext, getNavigationBarMetrics, hasInjectionContext, inject, injectGlobal, isNoSetData, markNoSetData, mergeModels, mountRuntimeInstance, 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, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, provide, provideGlobal, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, waitForLayoutHost };
@@ -1 +1 @@
1
- import{setGlobalProvidedValue as e}from"./provideStore.mjs";import{WEVU_APP_PROVIDES_KEY as t,WEVU_IS_APP_INSTANCE_KEY as n,WEVU_PARENT_INSTANCE_KEY as r,WEVU_PROVIDES_KEY as i,WEVU_RUNTIME_APP_KEY as a}from"@weapp-core/constants";function o(e){return!!(e&&typeof e==`object`&&e[n]===!0)}function s(e){return Object.create(e==null?null:e)}function c(e){if(!e)return s();let n=e[t];if(n&&typeof n==`object`)return n;let r=s();try{Object.defineProperty(e,t,{value:r,configurable:!0,enumerable:!1,writable:!1})}catch(n){e[t]=r}return r}function l(e,t){try{Object.defineProperty(e,i,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(n){e[i]=t}}function u(e){var t,n;let u=e[i];if(u&&typeof u==`object`)return u;let d=e[a],f=(t=(n=e[r])==null?void 0:n[i])==null?c(d):t,p=o(e)?c(d):s(f);return l(e,p),p}function d(e){return c(e)}function f(t,n,r){c(t)[n]=r,e(n,r)}function p(e,t,n){var a;let u=c(t),d=(a=n==null?void 0:n[i])==null?u:a,f=o(e)?u:s(d);if(n)try{Object.defineProperty(e,r,{value:n,configurable:!0,enumerable:!1,writable:!0})}catch(t){e[r]=n}l(e,f)}function m(e,t){let n=Object.getPrototypeOf(e);for(;n;){if(n===t)return!0;n=Object.getPrototypeOf(n)}return!1}function h(e,t){let n=u(e),i=u(t);if(!(n===i||m(n,i)||m(i,n))){Object.setPrototypeOf(i,n);try{Object.defineProperty(t,r,{value:e,configurable:!0,enumerable:!1,writable:!0})}catch(n){t[r]=e}}}export{l as attachInstanceProvides,h as attachRuntimeLayoutProvideContext,p as attachRuntimeProvideContext,d as ensureRuntimeAppProvides,u as getInstanceProvides,o as isRuntimeAppInstance,f as setRuntimeAppProvidedValue};
1
+ import{setGlobalProvidedValue as e}from"./provideStore.mjs";import{WEVU_APP_PROVIDES_KEY as t,WEVU_IS_APP_INSTANCE_KEY as n,WEVU_PARENT_INSTANCE_KEY as r,WEVU_PROVIDES_KEY as i,WEVU_RUNTIME_APP_KEY as a}from"@weapp-core/constants";function o(e){return!!(e&&typeof e==`object`&&e[n]===!0)}function s(e){return Object.create(e==null?null:e)}function c(e){if(!e)return s();let n=e[t];if(n&&typeof n==`object`)return n;let r=s();try{Object.defineProperty(e,t,{value:r,configurable:!0,enumerable:!1,writable:!1})}catch(n){e[t]=r}return r}function l(e,t){try{Object.defineProperty(e,i,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(n){e[i]=t}}function u(e){var t,n;let u=e[i];if(u&&typeof u==`object`)return u;let d=e[a],f=(t=(n=e[r])==null?void 0:n[i])==null?c(d):t,p=o(e)?c(d):s(f);return l(e,p),p}function d(e){return c(e)}function f(t,n,r,i={}){c(t)[n]=r,i.syncGlobal!==!1&&e(n,r)}function p(e,t,n){var a;let u=c(t),d=(a=n==null?void 0:n[i])==null?u:a,f=o(e)?u:s(d);if(n)try{Object.defineProperty(e,r,{value:n,configurable:!0,enumerable:!1,writable:!0})}catch(t){e[r]=n}l(e,f)}function m(e,t){let n=Object.getPrototypeOf(e);for(;n;){if(n===t)return!0;n=Object.getPrototypeOf(n)}return!1}function h(e,t){let n=u(e),i=u(t);if(!(n===i||m(n,i)||m(i,n))){Object.setPrototypeOf(i,n);try{Object.defineProperty(t,r,{value:e,configurable:!0,enumerable:!1,writable:!0})}catch(n){t[r]=e}}}export{l as attachInstanceProvides,h as attachRuntimeLayoutProvideContext,p as attachRuntimeProvideContext,d as ensureRuntimeAppProvides,u as getInstanceProvides,o as isRuntimeAppInstance,f as setRuntimeAppProvidedValue};
@@ -1 +1 @@
1
- import{getMiniProgramRuntimeGlobalObject as e}from"../../platform.mjs";import{callHookList as t}from"../../hooks/base.mjs";import{resolveRuntimePageLayoutName as n,syncRuntimePageLayoutState as r}from"../../pageLayout.mjs";import{getOwnerProxy as i}from"../../scopedSlots.mjs";import{clearTemplateRefs as a,scheduleTemplateRefUpdate as o}from"../../templateRefs.mjs";import{enableDeferredSetData as s,mountRuntimeInstance as c,refreshRuntimeInstance as l,setRuntimeSetDataVisibility as u,teardownRuntimeInstance as ee}from"../runtimeInstance.mjs";import{registerRuntimeLayoutHosts as te,unregisterRuntimeLayoutHosts as ne}from"../../layoutBridge.mjs";import{registerNativeComponentDefinition as d}from"./registerNativeDefinition.mjs";import{WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY as f,WEVU_LAYOUT_HOST_BRIDGE_KEY as p,WEVU_PAGE_LAYOUT_NAME_KEY as m,WEVU_PAGE_LAYOUT_PROPS_KEY as h,WEVU_PAGE_LAYOUT_SETTER_KEY as g,WEVU_PUBLIC_RUNTIME_KEY as _,WEVU_READY_CALLED_KEY as v,WEVU_RESOLVE_PUBLIC_INSTANCE_METHOD as y,WEVU_RUNTIME_KEY as b,WEVU_RUNTIME_OWNER_ID_KEY as re,WEVU_SLOT_OWNER_ID_KEY as x,WEVU_TEMPLATE_REFS_KEY as S}from"@weapp-core/constants";function C(e){let t=e.selectOwnerComponent;if(typeof t==`function`)try{let n=t.call(e);n&&n!==e&&o(n)}catch(e){}}function w(w){var T;let{runtimeApp:E,watch:D,setup:O,restOptions:k,pageLifecycleHooks:A,finalObservers:j,userLifetimes:M,userPageLifetimes:N,finalMethods:P,finalOptions:F,applyExtraInstanceFields:I,templateRefs:L,layoutHosts:R,attachWevuPropKeys:z,setupLifecycle:B,syncWevuPropsFromInstance:V,directPropsDerivedKeys:H,isPage:U,vueLifecycles:W,getRuntimeOwnerLabel:G}=w,K=e=>{var t;let n=(t=e.__wevu)==null?e[_]:t;if(n)return n;let r=e.$state;if(r&&typeof r==`object`)return r[b]},ie=e=>{var t,n,r,i,a;return(t=(n=(r=e[re])==null?e[x]:r)==null?(i=e.data)==null?void 0:i[x]:n)==null?(a=e.properties)==null?void 0:a[x]:t},ae=e=>{var t;let n=(t=K(e))==null?void 0:t.proxy;if(n)return n;let r=ie(e);if(typeof r==`string`&&r){var a;return(a=i(r))==null?e:a}return e},q=e=>{let t=K(e);return t?{runtime:t,mounted:!1}:(I(e),z(e),c(e,E,D,O,{deferSetData:!0,snapshotOmitKeys:H}),V(e),s(e),{runtime:K(e),mounted:!0})},J=(e,t,n)=>{let r=W[t];if(typeof r==`function`)return r.apply(ae(e),n)},oe=e=>{K(e)||typeof W.mounted!=`function`||q(e).mounted&&(J(e,`created`,[]),J(e,`beforeMount`,[]))},Y={},X=e=>{if(!Array.isArray(R)||!R.length||e[p])return;let t=te(R,e);t&&(e[p]=t)},Z=e=>{U&&(e[g]=(t,i)=>{var a;let o=(a=e.__wevu)==null?void 0:a.state;if(!o||typeof o!=`object`)return;o[m]=n(t);let s=t===!1||i==null?{}:i;o[h]=s,r(e,t,s)})};if(U)for(let e of[`onPullDownRefresh`,`onReachBottom`,`onShareAppMessage`,`onShareTimeline`,`onAddToFavorites`]){let t=A[e];typeof t==`function`&&typeof P[e]!=`function`&&(Y[e]=function(...e){return t.apply(this,e)})}let Q={...k,...U?A:{},observers:j,lifetimes:{...M,created:function(...e){if(J(this,`beforeCreate`,e),I(this),Array.isArray(L)&&L.length&&Object.defineProperty(this,S,{value:L,configurable:!0,enumerable:!1,writable:!1}),z(this),B===`created`){try{c(this,E,D,O,{deferSetData:!0,snapshotOmitKeys:H})}catch(e){let t=G(this);throw Error(`[wevu] mount runtime failed in created (${t}): ${e instanceof Error?e.message:String(e)}`)}V(this),Z(this)}typeof M.created==`function`&&M.created.apply(this,e)},moved:function(...e){t(this,`onMoved`,e),typeof M.moved==`function`&&M.moved.apply(this,e)},attached:function(...e){if(I(this),Array.isArray(L)&&L.length&&!this[S]&&Object.defineProperty(this,S,{value:L,configurable:!0,enumerable:!1,writable:!1}),z(this),B!==`created`||!this.__wevu)try{c(this,E,D,O,{deferSetData:!0,snapshotOmitKeys:H})}catch(e){let t=G(this);throw Error(`[wevu] mount runtime failed in attached (${t}): ${e instanceof Error?e.message:String(e)}`)}V(this),J(this,`created`,e),J(this,`beforeMount`,e),Z(this),X(this),s(this),t(this,`onAttached`,e),typeof M.attached==`function`&&M.attached.apply(this,e)},ready:function(...e){if(oe(this),U&&typeof A.onReady==`function`){let t=!!this[v];A.onReady.call(this,...e),t||J(this,`mounted`,e),typeof M.ready==`function`&&M.ready.apply(this,e);return}if(!this[v]){this[v]=!0,V(this),C(this),o(this,()=>{t(this,`onReady`,e),J(this,`mounted`,e),typeof M.ready==`function`&&M.ready.apply(this,e)});return}typeof M.ready==`function`&&M.ready.apply(this,e)},detached:function(...e){if(J(this,`beforeUnmount`,e),J(this,`beforeDestroy`,e),C(this),t(this,`onDetached`,e),U&&typeof A.onUnload==`function`){A.onUnload.call(this,...e),typeof M.detached==`function`&&M.detached.apply(this,e),J(this,`unmounted`,e),J(this,`destroyed`,e);return}a(this),Array.isArray(R)&&R.length&&this[p]&&(ne(R,this[p]),delete this[p]),ee(this),J(this,`unmounted`,e),J(this,`destroyed`,e),typeof M.detached==`function`&&M.detached.apply(this,e)},error:function(...e){t(this,`onError`,e),typeof M.error==`function`&&M.error.apply(this,e)}},pageLifetimes:{...N,show:function(...e){if(U&&typeof A.onShow==`function`){A.onShow.call(this,...e),typeof N.show==`function`&&N.show.apply(this,e);return}u(this,!0),t(this,`onShow`,e),typeof N.show==`function`&&N.show.apply(this,e)},hide:function(...e){if(U&&typeof A.onHide==`function`){A.onHide.call(this,...e),typeof N.hide==`function`&&N.hide.apply(this,e);return}u(this,!1),t(this,`onHide`,e),typeof N.hide==`function`&&N.hide.apply(this,e)},resize:function(...e){if(U&&typeof A.onResize==`function`){A.onResize.call(this,...e),typeof N.resize==`function`&&N.resize.apply(this,e);return}t(this,`onResize`,e),typeof N.resize==`function`&&N.resize.apply(this,e)},routeDone:function(...e){if(U&&typeof A.onRouteDone==`function`){A.onRouteDone.call(this,...e),typeof N.routeDone==`function`&&N.routeDone.apply(this,e);return}t(this,`onRouteDone`,e),typeof N.routeDone==`function`&&N.routeDone.apply(this,e)}},methods:{...Y,...P,[y]:function(){var e;let t=q(this);return t.mounted&&(J(this,`created`,[]),J(this,`beforeMount`,[])),(e=t.runtime)==null?void 0:e.proxy}},options:F},$=(T=e())==null?void 0:T[f];if(typeof($==null?void 0:$.trackWevuComponent)==`function`){let e=$.trackWevuComponent(Q,(e,t)=>{l(e,E,D,O,{snapshotOmitKeys:H,stateSnapshot:t}),V(e),Z(e),X(e),s(e,{rehydrateSetupState:!0})});$.isApplying()||d(e,U)}else d(Q,U)}export{w as registerComponentDefinition};
1
+ import{getMiniProgramRuntimeGlobalObject as e}from"../../platform.mjs";import{callHookList as t}from"../../hooks/base.mjs";import{resolveRuntimePageLayoutName as n,syncRuntimePageLayoutState as r}from"../../pageLayout.mjs";import{getOwnerProxy as i}from"../../scopedSlots.mjs";import{clearTemplateRefs as a,scheduleTemplateRefUpdate as o}from"../../templateRefs.mjs";import{enableDeferredSetData as s,mountRuntimeInstance as c,refreshRuntimeInstance as l,setRuntimeSetDataVisibility as u,teardownRuntimeInstance as ee}from"../runtimeInstance.mjs";import{registerRuntimeLayoutHosts as te,unregisterRuntimeLayoutHosts as ne}from"../../layoutBridge.mjs";import{registerNativeComponentDefinition as d}from"./registerNativeDefinition.mjs";import{WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY as f,WEVU_LAYOUT_HOST_BRIDGE_KEY as p,WEVU_PAGE_LAYOUT_NAME_KEY as m,WEVU_PAGE_LAYOUT_PROPS_KEY as h,WEVU_PAGE_LAYOUT_SETTER_KEY as g,WEVU_PUBLIC_RUNTIME_KEY as _,WEVU_READY_CALLED_KEY as v,WEVU_RESOLVE_PUBLIC_INSTANCE_METHOD as y,WEVU_RUNTIME_KEY as b,WEVU_RUNTIME_OWNER_ID_KEY as re,WEVU_SLOT_OWNER_ID_KEY as x,WEVU_TEMPLATE_REFS_KEY as S}from"@weapp-core/constants";function C(e){let t=e.selectOwnerComponent;if(typeof t==`function`)try{let n=t.call(e);n&&n!==e&&o(n)}catch(e){}}function w(w){var T;let{runtimeApp:E,watch:D,setup:O,restOptions:k,pageLifecycleHooks:A,finalObservers:j,userLifetimes:M,userPageLifetimes:N,finalMethods:P,finalOptions:F,applyExtraInstanceFields:I,templateRefs:L,layoutHosts:R,attachWevuPropKeys:z,setupLifecycle:B,syncWevuPropsFromInstance:V,directPropsDerivedKeys:H,isPage:U,vueLifecycles:W,getRuntimeOwnerLabel:G,registerNative:ie=!0}=w,K=e=>{var t;let n=(t=e.__wevu)==null?e[_]:t;if(n)return n;let r=e.$state;if(r&&typeof r==`object`)return r[b]},ae=e=>{var t,n,r,i,a;return(t=(n=(r=e[re])==null?e[x]:r)==null?(i=e.data)==null?void 0:i[x]:n)==null?(a=e.properties)==null?void 0:a[x]:t},oe=e=>{var t;let n=(t=K(e))==null?void 0:t.proxy;if(n)return n;let r=ae(e);if(typeof r==`string`&&r){var a;return(a=i(r))==null?e:a}return e},q=e=>{let t=K(e);return t?{runtime:t,mounted:!1}:(I(e),z(e),c(e,E,D,O,{deferSetData:!0,snapshotOmitKeys:H}),V(e),s(e),{runtime:K(e),mounted:!0})},J=(e,t,n)=>{let r=W[t];if(typeof r==`function`)return r.apply(oe(e),n)},se=e=>{K(e)||typeof W.mounted!=`function`||q(e).mounted&&(J(e,`created`,[]),J(e,`beforeMount`,[]))},Y={},X=e=>{if(!Array.isArray(R)||!R.length||e[p])return;let t=te(R,e);t&&(e[p]=t)},Z=e=>{U&&(e[g]=(t,i)=>{var a;let o=(a=e.__wevu)==null?void 0:a.state;if(!o||typeof o!=`object`)return;o[m]=n(t);let s=t===!1||i==null?{}:i;o[h]=s,r(e,t,s)})};if(U)for(let e of[`onPullDownRefresh`,`onReachBottom`,`onShareAppMessage`,`onShareTimeline`,`onAddToFavorites`]){let t=A[e];typeof t==`function`&&typeof P[e]!=`function`&&(Y[e]=function(...e){return t.apply(this,e)})}let Q={...k,...U?A:{},observers:j,lifetimes:{...M,created:function(...e){if(J(this,`beforeCreate`,e),I(this),Array.isArray(L)&&L.length&&Object.defineProperty(this,S,{value:L,configurable:!0,enumerable:!1,writable:!1}),z(this),B===`created`){try{c(this,E,D,O,{deferSetData:!0,snapshotOmitKeys:H})}catch(e){let t=G(this);throw Error(`[wevu] mount runtime failed in created (${t}): ${e instanceof Error?e.message:String(e)}`)}V(this),Z(this)}typeof M.created==`function`&&M.created.apply(this,e)},moved:function(...e){t(this,`onMoved`,e),typeof M.moved==`function`&&M.moved.apply(this,e)},attached:function(...e){if(I(this),Array.isArray(L)&&L.length&&!this[S]&&Object.defineProperty(this,S,{value:L,configurable:!0,enumerable:!1,writable:!1}),z(this),B!==`created`||!this.__wevu)try{c(this,E,D,O,{deferSetData:!0,snapshotOmitKeys:H})}catch(e){let t=G(this);throw Error(`[wevu] mount runtime failed in attached (${t}): ${e instanceof Error?e.message:String(e)}`)}V(this),J(this,`created`,e),J(this,`beforeMount`,e),Z(this),X(this),s(this),t(this,`onAttached`,e),typeof M.attached==`function`&&M.attached.apply(this,e)},ready:function(...e){if(se(this),U&&typeof A.onReady==`function`){let t=!!this[v];A.onReady.call(this,...e),t||J(this,`mounted`,e),typeof M.ready==`function`&&M.ready.apply(this,e);return}if(!this[v]){this[v]=!0,V(this),C(this),o(this,()=>{t(this,`onReady`,e),J(this,`mounted`,e),typeof M.ready==`function`&&M.ready.apply(this,e)});return}typeof M.ready==`function`&&M.ready.apply(this,e)},detached:function(...e){if(J(this,`beforeUnmount`,e),J(this,`beforeDestroy`,e),C(this),t(this,`onDetached`,e),U&&typeof A.onUnload==`function`){A.onUnload.call(this,...e),typeof M.detached==`function`&&M.detached.apply(this,e),J(this,`unmounted`,e),J(this,`destroyed`,e);return}a(this),Array.isArray(R)&&R.length&&this[p]&&(ne(R,this[p]),delete this[p]),ee(this),J(this,`unmounted`,e),J(this,`destroyed`,e),typeof M.detached==`function`&&M.detached.apply(this,e)},error:function(...e){t(this,`onError`,e),typeof M.error==`function`&&M.error.apply(this,e)}},pageLifetimes:{...N,show:function(...e){if(U&&typeof A.onShow==`function`){A.onShow.call(this,...e),typeof N.show==`function`&&N.show.apply(this,e);return}u(this,!0),t(this,`onShow`,e),typeof N.show==`function`&&N.show.apply(this,e)},hide:function(...e){if(U&&typeof A.onHide==`function`){A.onHide.call(this,...e),typeof N.hide==`function`&&N.hide.apply(this,e);return}u(this,!1),t(this,`onHide`,e),typeof N.hide==`function`&&N.hide.apply(this,e)},resize:function(...e){if(U&&typeof A.onResize==`function`){A.onResize.call(this,...e),typeof N.resize==`function`&&N.resize.apply(this,e);return}t(this,`onResize`,e),typeof N.resize==`function`&&N.resize.apply(this,e)},routeDone:function(...e){if(U&&typeof A.onRouteDone==`function`){A.onRouteDone.call(this,...e),typeof N.routeDone==`function`&&N.routeDone.apply(this,e);return}t(this,`onRouteDone`,e),typeof N.routeDone==`function`&&N.routeDone.apply(this,e)}},methods:{...Y,...P,[y]:function(){var e;let t=q(this);return t.mounted&&(J(this,`created`,[]),J(this,`beforeMount`,[])),(e=t.runtime)==null?void 0:e.proxy}},options:F};if(!ie)return Q;let $=(T=e())==null?void 0:T[f];if(typeof($==null?void 0:$.trackWevuComponent)==`function`){let e=$.trackWevuComponent(Q,(e,t)=>{l(e,E,D,O,{snapshotOmitKeys:H,stateSnapshot:t}),V(e),Z(e),X(e),s(e,{rehydrateSetupState:!0})});return $.isApplying()||d(e,U),e}return d(Q,U),Q}export{w as registerComponentDefinition};
@@ -10,6 +10,8 @@ import { WatchMap } from "./watch.mjs";
10
10
  * 注册组件入口(框架内部使用)。
11
11
  * @internal
12
12
  */
13
- declare function registerComponent<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(runtimeApp: RuntimeApp<D, C, M>, methods: MethodDefinitions, watch: WatchMap | undefined, setup: DefineComponentOptions<ComponentPropsOptions, D, C, M>['setup'], mpOptions: MiniProgramComponentRawOptions): void;
13
+ declare function registerComponent<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(runtimeApp: RuntimeApp<D, C, M>, methods: MethodDefinitions, watch: WatchMap | undefined, setup: DefineComponentOptions<ComponentPropsOptions, D, C, M>['setup'], mpOptions: MiniProgramComponentRawOptions, options?: {
14
+ registerNative?: boolean;
15
+ }): any;
14
16
  //#endregion
15
17
  export { registerComponent };
@@ -1 +1 @@
1
- import{resolveComponentFeatures as e}from"./component/features.mjs";import{createPageLifecycleHooks as t}from"./component/lifecycle.mjs";import{createComponentMethods as n}from"./component/methods.mjs";import{getRuntimeOwnerLabel as r,prepareComponentOptions as i}from"./component/options.mjs";import{createPropsSync as a}from"./component/props.mjs";import{registerComponentDefinition as ee}from"./component/registerDefinition.mjs";import{WEVU_EXPOSED_KEY as o,WEVU_HOOKS_KEY as s}from"@weapp-core/constants";function c(c,l,u,d,f){var p;let{userMethods:m,userLifetimes:h,userPageLifetimes:g,userOptions:_,restOptions:v,topLevelMethods:y,templateRefs:b,layoutHosts:x,propsAliases:S,propsDerivedKeys:C,userObservers:w,setupLifecycle:T,vueLifecycles:E,isPage:D,features:O,userOnLoad:k,userOnUnload:A,userOnShow:j,userOnHide:M,userOnReady:N,userOnSaveExitState:P,userOnPullDownRefresh:F,userOnReachBottom:I,userOnPageScroll:L,userOnRouteDone:R,userOnTabItemTap:z,userOnResize:te,userOnShareAppMessage:B,userOnShareTimeline:V,userOnAddToFavorites:H,applyExtraInstanceFields:U}=i(f),{enableOnPullDownRefresh:W,enableOnReachBottom:G,enableOnPageScroll:K,enableOnRouteDone:q,enableOnRouteDoneFallback:J,enableOnTabItemTap:Y,enableOnResize:X,enableOnShareAppMessage:Z,enableOnShareTimeline:Q,enableOnAddToFavorites:ne,enableOnSaveExitState:re,effectiveOnSaveExitState:ie,effectiveOnPullDownRefresh:ae,effectiveOnReachBottom:oe,effectiveOnPageScroll:se,effectiveOnRouteDone:ce,effectiveOnTabItemTap:le,effectiveOnResize:ue,effectiveOnShareAppMessage:de,effectiveOnShareTimeline:fe,effectiveOnAddToFavorites:pe}=e({features:O,userOnSaveExitState:P,userOnPullDownRefresh:F,userOnReachBottom:I,userOnPageScroll:L,userOnRouteDone:R,userOnTabItemTap:z,userOnResize:te,userOnShareAppMessage:B,userOnShareTimeline:V,userOnAddToFavorites:H}),me=(e,t)=>{let n=e[s];if(!n)return!1;let r=n[t];return r?Array.isArray(r)?r.length>0:typeof r==`function`:!1};{let e=v.export;v.export=function(){var t;let n=(t=this[o])==null?{}:t,r=typeof e==`function`?e.call(this):{};return r&&typeof r==`object`&&!Array.isArray(r)?{...n,...r}:r==null?n:r}}let he={multipleSlots:(p=_.multipleSlots)==null||p,..._},{attachWevuPropKeys:ge,directPropsDerivedKeys:_e,syncWevuPropsFromInstance:ve,syncWevuPropsFromValues:$,finalObservers:ye}=a({restOptions:v,propsAliases:S,propsDerivedKeys:C,userObservers:w}),{finalMethods:be}=n({userMethods:{...y,...m},runtimeMethods:l}),xe=t({runtimeApp:c,watch:u,setup:d,userOnLoad:k,userOnUnload:A,userOnShow:j,userOnHide:M,userOnReady:N,isPage:D,enableOnSaveExitState:re,enableOnPullDownRefresh:W,enableOnReachBottom:G,enableOnPageScroll:K,enableOnRouteDone:q,enableOnRouteDoneFallback:J,enableOnTabItemTap:Y,enableOnResize:X,enableOnShareAppMessage:Z,enableOnShareTimeline:Q,enableOnAddToFavorites:ne,syncWevuPropsFromValues:$,effectiveOnSaveExitState:ie,effectiveOnPullDownRefresh:ae,effectiveOnReachBottom:oe,effectiveOnPageScroll:se,effectiveOnRouteDone:ce,effectiveOnTabItemTap:le,effectiveOnResize:ue,effectiveOnShareAppMessage:de,effectiveOnShareTimeline:fe,effectiveOnAddToFavorites:pe,hasHook:me});ee({runtimeApp:c,watch:u,setup:d,restOptions:v,pageLifecycleHooks:xe,finalObservers:ye,userLifetimes:h,userPageLifetimes:g,finalMethods:be,finalOptions:he,applyExtraInstanceFields:U,templateRefs:b,layoutHosts:x,attachWevuPropKeys:ge,setupLifecycle:T,syncWevuPropsFromInstance:ve,syncWevuPropsFromValues:$,directPropsDerivedKeys:_e,isPage:D,vueLifecycles:E,getRuntimeOwnerLabel:r})}export{c as registerComponent};
1
+ import{resolveComponentFeatures as e}from"./component/features.mjs";import{createPageLifecycleHooks as t}from"./component/lifecycle.mjs";import{createComponentMethods as n}from"./component/methods.mjs";import{getRuntimeOwnerLabel as r,prepareComponentOptions as i}from"./component/options.mjs";import{createPropsSync as a}from"./component/props.mjs";import{registerComponentDefinition as ee}from"./component/registerDefinition.mjs";import{WEVU_EXPOSED_KEY as o,WEVU_HOOKS_KEY as s}from"@weapp-core/constants";function c(c,l,u,d,f,p={}){var m;let{userMethods:h,userLifetimes:g,userPageLifetimes:_,userOptions:v,restOptions:y,topLevelMethods:b,templateRefs:x,layoutHosts:S,propsAliases:C,propsDerivedKeys:w,userObservers:T,setupLifecycle:E,vueLifecycles:D,isPage:O,features:k,userOnLoad:A,userOnUnload:j,userOnShow:M,userOnHide:N,userOnReady:P,userOnSaveExitState:F,userOnPullDownRefresh:I,userOnReachBottom:L,userOnPageScroll:R,userOnRouteDone:z,userOnTabItemTap:B,userOnResize:V,userOnShareAppMessage:H,userOnShareTimeline:U,userOnAddToFavorites:W,applyExtraInstanceFields:G}=i(f),{enableOnPullDownRefresh:K,enableOnReachBottom:q,enableOnPageScroll:te,enableOnRouteDone:J,enableOnRouteDoneFallback:Y,enableOnTabItemTap:X,enableOnResize:Z,enableOnShareAppMessage:Q,enableOnShareTimeline:ne,enableOnAddToFavorites:re,enableOnSaveExitState:ie,effectiveOnSaveExitState:ae,effectiveOnPullDownRefresh:oe,effectiveOnReachBottom:se,effectiveOnPageScroll:ce,effectiveOnRouteDone:le,effectiveOnTabItemTap:ue,effectiveOnResize:de,effectiveOnShareAppMessage:fe,effectiveOnShareTimeline:pe,effectiveOnAddToFavorites:me}=e({features:k,userOnSaveExitState:F,userOnPullDownRefresh:I,userOnReachBottom:L,userOnPageScroll:R,userOnRouteDone:z,userOnTabItemTap:B,userOnResize:V,userOnShareAppMessage:H,userOnShareTimeline:U,userOnAddToFavorites:W}),he=(e,t)=>{let n=e[s];if(!n)return!1;let r=n[t];return r?Array.isArray(r)?r.length>0:typeof r==`function`:!1};{let e=y.export;y.export=function(){var t;let n=(t=this[o])==null?{}:t,r=typeof e==`function`?e.call(this):{};return r&&typeof r==`object`&&!Array.isArray(r)?{...n,...r}:r==null?n:r}}let ge={multipleSlots:(m=v.multipleSlots)==null||m,...v},{attachWevuPropKeys:_e,directPropsDerivedKeys:ve,syncWevuPropsFromInstance:ye,syncWevuPropsFromValues:$,finalObservers:be}=a({restOptions:y,propsAliases:C,propsDerivedKeys:w,userObservers:T}),{finalMethods:xe}=n({userMethods:{...b,...h},runtimeMethods:l}),Se=t({runtimeApp:c,watch:u,setup:d,userOnLoad:A,userOnUnload:j,userOnShow:M,userOnHide:N,userOnReady:P,isPage:O,enableOnSaveExitState:ie,enableOnPullDownRefresh:K,enableOnReachBottom:q,enableOnPageScroll:te,enableOnRouteDone:J,enableOnRouteDoneFallback:Y,enableOnTabItemTap:X,enableOnResize:Z,enableOnShareAppMessage:Q,enableOnShareTimeline:ne,enableOnAddToFavorites:re,syncWevuPropsFromValues:$,effectiveOnSaveExitState:ae,effectiveOnPullDownRefresh:oe,effectiveOnReachBottom:se,effectiveOnPageScroll:ce,effectiveOnRouteDone:le,effectiveOnTabItemTap:ue,effectiveOnResize:de,effectiveOnShareAppMessage:fe,effectiveOnShareTimeline:pe,effectiveOnAddToFavorites:me,hasHook:he});return ee({runtimeApp:c,watch:u,setup:d,restOptions:y,pageLifecycleHooks:Se,finalObservers:be,userLifetimes:g,userPageLifetimes:_,finalMethods:xe,finalOptions:ge,applyExtraInstanceFields:G,templateRefs:x,layoutHosts:S,attachWevuPropKeys:_e,setupLifecycle:E,syncWevuPropsFromInstance:ye,syncWevuPropsFromValues:$,directPropsDerivedKeys:ve,isPage:O,vueLifecycles:D,getRuntimeOwnerLabel:r,registerNative:p.registerNative})}export{c as registerComponent};
@@ -83,4 +83,4 @@ declare const Vue2: undefined;
83
83
  */
84
84
  declare function install(): void;
85
85
  //#endregion
86
- export { type ActionContext, type ActionSubscriber, type AlipayMiniProgramHostNamespace, type AlipayMiniProgramHostSourceContract, type AllowedComponentProps, type AppConfig, type ComponentCustomProps, 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, DefineComponentTypePropsOptions, 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, LayoutBridgeInstance, 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 MiniProgramCSSProperties, 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 MiniProgramDatasetAttributes, type MiniProgramHostNamespace, type MiniProgramHostNamespaceBySource, type MiniProgramHostSourceName, type MiniProgramHostSourceRegistry, type MiniProgramHtmlAliasIntrinsicElements, type MiniProgramInstance, type HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, type MiniProgramIntrinsicElementBaseAttributes, type MiniProgramIntrinsicElements, type MiniProgramIntrinsicEventHandler, 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, PageLayoutState, PageMeta, PageStackSnapshot, type PrelinkReactiveTreeOptions, type PropConstructor, type PropOptions, type PropType, type PublicProps, PullDownRefreshHandler, type Ref, type RuntimeApp, type RuntimeInstance, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextNativeInstance, type SetupContextRouter, SetupContextWithTypeProps, type SetupFunction, 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, UseAsyncPullDownRefreshOptions, UseBoundingClientRectOptions, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, UseIntersectionObserverOptions, UseIntersectionObserverResult, type UseModelOptions, UseNavigationBarMetricsOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UsePageStackOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, UseUpdatePerformanceListenerStopHandle, type VNode, type VNodeProps, Vue2, type WatchCallback, type WatchEffect, type WatchEffectOptions, type WatchMultiSources, type WatchOptions, type WatchScheduler, type WatchSource, type WatchSourceValue, type WatchSources, type WatchStopHandle, type WeappCSSProperties, type WeappDatasetAttributes, type WeappHtmlAliasIntrinsicElements, type WeappIntrinsicElementBaseAttributes, type WeappIntrinsicElements, type WeappIntrinsicEventHandler, type WechatMiniProgramHostNamespace, type WechatMiniProgramHostSourceContract, WevuComponentConstructor, type WevuDefaults, WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, 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, install, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, isVue2, isVue3, 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, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, 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 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, LayoutBridgeInstance, 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 MiniProgramCSSProperties, 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 MiniProgramDatasetAttributes, type MiniProgramHostNamespace, type MiniProgramHostNamespaceBySource, type MiniProgramHostSourceName, type MiniProgramHostSourceRegistry, type MiniProgramHtmlAliasIntrinsicElements, type MiniProgramInstance, type HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, type MiniProgramIntrinsicElementBaseAttributes, type MiniProgramIntrinsicElements, type MiniProgramIntrinsicEventHandler, 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, PageLayoutState, PageMeta, PageStackSnapshot, type PrelinkReactiveTreeOptions, type PropConstructor, type PropOptions, type PropType, type PublicProps, PullDownRefreshHandler, type Ref, type RuntimeApp, type RuntimeInstance, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextNativeInstance, type SetupContextRouter, 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, UseAsyncPullDownRefreshOptions, UseBoundingClientRectOptions, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, UseIntersectionObserverOptions, UseIntersectionObserverResult, type UseModelOptions, UseNavigationBarMetricsOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UsePageStackOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, UseUpdatePerformanceListenerStopHandle, type VNode, type VNodeProps, Vue2, type WatchCallback, type WatchEffect, type WatchEffectOptions, type WatchMultiSources, type WatchOptions, type WatchScheduler, type WatchSource, type WatchSourceValue, type WatchSources, type WatchStopHandle, type WeappCSSProperties, type WeappDatasetAttributes, type WeappHtmlAliasIntrinsicElements, type WeappIntrinsicElementBaseAttributes, type WeappIntrinsicElements, type WeappIntrinsicEventHandler, type WechatMiniProgramHostNamespace, type WechatMiniProgramHostSourceContract, type WevuComponentConstructor, type WevuDefaults, type WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, 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, install, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, isVue2, isVue3, 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, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, 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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wevu",
3
3
  "type": "module",
4
- "version": "6.20.4",
4
+ "version": "6.21.0",
5
5
  "description": "Vue 3 风格的小程序运行时,包含响应式、diff+setData 与轻量状态管理",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -227,10 +227,10 @@
227
227
  "dependencies": {
228
228
  "vue": "^3.5.41",
229
229
  "@weapp-core/constants": "0.1.17",
230
- "@wevu/api": "0.2.16",
231
230
  "@weapp-core/shared": "3.1.1",
232
- "@wevu/compiler": "6.20.4",
233
- "@wevu/web-apis": "1.2.34"
231
+ "@wevu/compiler": "6.21.0",
232
+ "@wevu/web-apis": "1.2.34",
233
+ "@wevu/api": "0.2.16"
234
234
  },
235
235
  "scripts": {
236
236
  "dev": "tsdown -w",