@vue/reactivity
Advanced tools
Comparing version 3.0.0-alpha.13 to 3.0.0-beta.1
@@ -542,3 +542,3 @@ 'use strict'; | ||
// observable creation. | ||
const nonReactiveValues = new WeakSet(); | ||
const rawValues = new WeakSet(); | ||
const collectionTypes = new Set([Set, Map, WeakMap, WeakSet]); | ||
@@ -550,3 +550,3 @@ const isObservableType = /*#__PURE__*/ shared.makeMap('Object,Array,Map,Set,WeakMap,WeakSet'); | ||
isObservableType(shared.toRawType(value)) && | ||
!nonReactiveValues.has(value) && | ||
!rawValues.has(value) && | ||
!Object.isFrozen(value)); | ||
@@ -606,3 +606,4 @@ }; | ||
function isReactive(value) { | ||
return reactiveToRaw.has(value) || readonlyToRaw.has(value); | ||
value = readonlyToRaw.get(value) || value; | ||
return reactiveToRaw.has(value); | ||
} | ||
@@ -612,2 +613,5 @@ function isReadonly(value) { | ||
} | ||
function isProxy(value) { | ||
return readonlyToRaw.has(value) || reactiveToRaw.has(value); | ||
} | ||
function toRaw(observed) { | ||
@@ -617,4 +621,4 @@ observed = readonlyToRaw.get(observed) || observed; | ||
} | ||
function markNonReactive(value) { | ||
nonReactiveValues.add(value); | ||
function markRaw(value) { | ||
rawValues.add(value); | ||
return value; | ||
@@ -670,3 +674,3 @@ } | ||
function toRefs(object) { | ||
if ( !isReactive(object)) { | ||
if ( !isProxy(object)) { | ||
console.warn(`toRefs() expects a reactive object but received a plain one.`); | ||
@@ -744,6 +748,7 @@ } | ||
exports.enableTracking = enableTracking; | ||
exports.isProxy = isProxy; | ||
exports.isReactive = isReactive; | ||
exports.isReadonly = isReadonly; | ||
exports.isRef = isRef; | ||
exports.markNonReactive = markNonReactive; | ||
exports.markRaw = markRaw; | ||
exports.pauseTracking = pauseTracking; | ||
@@ -750,0 +755,0 @@ exports.reactive = reactive; |
@@ -492,3 +492,3 @@ 'use strict'; | ||
// observable creation. | ||
const nonReactiveValues = new WeakSet(); | ||
const rawValues = new WeakSet(); | ||
const collectionTypes = new Set([Set, Map, WeakMap, WeakSet]); | ||
@@ -500,3 +500,3 @@ const isObservableType = /*#__PURE__*/ shared.makeMap('Object,Array,Map,Set,WeakMap,WeakSet'); | ||
isObservableType(shared.toRawType(value)) && | ||
!nonReactiveValues.has(value) && | ||
!rawValues.has(value) && | ||
!Object.isFrozen(value)); | ||
@@ -553,3 +553,4 @@ }; | ||
function isReactive(value) { | ||
return reactiveToRaw.has(value) || readonlyToRaw.has(value); | ||
value = readonlyToRaw.get(value) || value; | ||
return reactiveToRaw.has(value); | ||
} | ||
@@ -559,2 +560,5 @@ function isReadonly(value) { | ||
} | ||
function isProxy(value) { | ||
return readonlyToRaw.has(value) || reactiveToRaw.has(value); | ||
} | ||
function toRaw(observed) { | ||
@@ -564,4 +568,4 @@ observed = readonlyToRaw.get(observed) || observed; | ||
} | ||
function markNonReactive(value) { | ||
nonReactiveValues.add(value); | ||
function markRaw(value) { | ||
rawValues.add(value); | ||
return value; | ||
@@ -684,6 +688,7 @@ } | ||
exports.enableTracking = enableTracking; | ||
exports.isProxy = isProxy; | ||
exports.isReactive = isReactive; | ||
exports.isReadonly = isReadonly; | ||
exports.isRef = isRef; | ||
exports.markNonReactive = markNonReactive; | ||
exports.markRaw = markRaw; | ||
exports.pauseTracking = pauseTracking; | ||
@@ -690,0 +695,0 @@ exports.reactive = reactive; |
@@ -44,2 +44,4 @@ | ||
export declare function isProxy(value: unknown): boolean; | ||
export declare function isReactive(value: unknown): boolean; | ||
@@ -57,3 +59,3 @@ | ||
export declare function markNonReactive<T extends object>(value: T): T; | ||
export declare function markRaw<T extends object>(value: T): T; | ||
@@ -134,6 +136,2 @@ export declare function pauseTracking(): void; | ||
} : {}) & (T extends { | ||
[Symbol.observable]: infer V; | ||
} ? { | ||
[Symbol.observable]: V; | ||
} : {}) & (T extends { | ||
[Symbol.replace]: infer V; | ||
@@ -140,0 +138,0 @@ } ? { |
@@ -539,3 +539,3 @@ import { EMPTY_OBJ, isArray, isSymbol, hasOwn, isObject, hasChanged, capitalize, toRawType, makeMap, isFunction, NOOP } from '@vue/shared'; | ||
// observable creation. | ||
const nonReactiveValues = new WeakSet(); | ||
const rawValues = new WeakSet(); | ||
const collectionTypes = new Set([Set, Map, WeakMap, WeakSet]); | ||
@@ -547,3 +547,3 @@ const isObservableType = /*#__PURE__*/ makeMap('Object,Array,Map,Set,WeakMap,WeakSet'); | ||
isObservableType(toRawType(value)) && | ||
!nonReactiveValues.has(value) && | ||
!rawValues.has(value) && | ||
!Object.isFrozen(value)); | ||
@@ -603,3 +603,4 @@ }; | ||
function isReactive(value) { | ||
return reactiveToRaw.has(value) || readonlyToRaw.has(value); | ||
value = readonlyToRaw.get(value) || value; | ||
return reactiveToRaw.has(value); | ||
} | ||
@@ -609,2 +610,5 @@ function isReadonly(value) { | ||
} | ||
function isProxy(value) { | ||
return readonlyToRaw.has(value) || reactiveToRaw.has(value); | ||
} | ||
function toRaw(observed) { | ||
@@ -614,4 +618,4 @@ observed = readonlyToRaw.get(observed) || observed; | ||
} | ||
function markNonReactive(value) { | ||
nonReactiveValues.add(value); | ||
function markRaw(value) { | ||
rawValues.add(value); | ||
return value; | ||
@@ -667,3 +671,3 @@ } | ||
function toRefs(object) { | ||
if ((process.env.NODE_ENV !== 'production') && !isReactive(object)) { | ||
if ((process.env.NODE_ENV !== 'production') && !isProxy(object)) { | ||
console.warn(`toRefs() expects a reactive object but received a plain one.`); | ||
@@ -737,2 +741,2 @@ } | ||
export { ITERATE_KEY, computed, customRef, effect, enableTracking, isReactive, isReadonly, isRef, markNonReactive, pauseTracking, reactive, readonly, ref, resetTracking, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, track, trigger, unref }; | ||
export { ITERATE_KEY, computed, customRef, effect, enableTracking, isProxy, isReactive, isReadonly, isRef, markRaw, pauseTracking, reactive, readonly, ref, resetTracking, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, track, trigger, unref }; |
@@ -576,3 +576,3 @@ // Make a map and return a function for checking if a key | ||
// observable creation. | ||
const nonReactiveValues = new WeakSet(); | ||
const rawValues = new WeakSet(); | ||
const collectionTypes = new Set([Set, Map, WeakMap, WeakSet]); | ||
@@ -584,3 +584,3 @@ const isObservableType = /*#__PURE__*/ makeMap('Object,Array,Map,Set,WeakMap,WeakSet'); | ||
isObservableType(toRawType(value)) && | ||
!nonReactiveValues.has(value) && | ||
!rawValues.has(value) && | ||
!Object.isFrozen(value)); | ||
@@ -640,3 +640,4 @@ }; | ||
function isReactive(value) { | ||
return reactiveToRaw.has(value) || readonlyToRaw.has(value); | ||
value = readonlyToRaw.get(value) || value; | ||
return reactiveToRaw.has(value); | ||
} | ||
@@ -646,2 +647,5 @@ function isReadonly(value) { | ||
} | ||
function isProxy(value) { | ||
return readonlyToRaw.has(value) || reactiveToRaw.has(value); | ||
} | ||
function toRaw(observed) { | ||
@@ -651,4 +655,4 @@ observed = readonlyToRaw.get(observed) || observed; | ||
} | ||
function markNonReactive(value) { | ||
nonReactiveValues.add(value); | ||
function markRaw(value) { | ||
rawValues.add(value); | ||
return value; | ||
@@ -704,3 +708,3 @@ } | ||
function toRefs(object) { | ||
if ( !isReactive(object)) { | ||
if ( !isProxy(object)) { | ||
console.warn(`toRefs() expects a reactive object but received a plain one.`); | ||
@@ -773,2 +777,2 @@ } | ||
export { ITERATE_KEY, computed, customRef, effect, enableTracking, isReactive, isReadonly, isRef, markNonReactive, pauseTracking, reactive, readonly, ref, resetTracking, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, track, trigger, unref }; | ||
export { ITERATE_KEY, computed, customRef, effect, enableTracking, isProxy, isReactive, isReadonly, isRef, markRaw, pauseTracking, reactive, readonly, ref, resetTracking, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, track, trigger, unref }; |
@@ -1,1 +0,1 @@ | ||
function t(t,e){const n=Object.create(null),r=t.split(",");for(let t=0;t<r.length;t++)n[r[t]]=!0;return e?t=>!!n[t.toLowerCase()]:t=>!!n[t]}const e={},n=()=>{},r=Object.prototype.hasOwnProperty,o=(t,e)=>r.call(t,e),c=Array.isArray,s=t=>"symbol"==typeof t,u=t=>null!==t&&"object"==typeof t,i=Object.prototype.toString,l=t=>(t=>i.call(t))(t).slice(8,-1),a=(t,e)=>t!==e&&(t==t||e==e),f=new WeakMap,d=[];let h;const p=Symbol(""),g=Symbol("");function v(t,n=e){(function(t){return t&&!0===t._isEffect})(t)&&(t=t.raw);const r=function(t,e){const n=function(...r){if(!n.active)return e.scheduler?void 0:t(...r);if(!d.includes(n)){S(n);try{return M(),d.push(n),h=n,t(...r)}finally{d.pop(),k(),h=d[d.length-1]}}};return n.id=w++,n._isEffect=!0,n.active=!0,n.raw=t,n.deps=[],n.options=e,n}(t,n);return n.lazy||r(),r}function y(t){t.active&&(S(t),t.options.onStop&&t.options.onStop(),t.active=!1)}let w=0;function S(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}let b=!0;const R=[];function m(){R.push(b),b=!1}function M(){R.push(b),b=!0}function k(){const t=R.pop();b=void 0===t||t}function E(t,e,n){if(!b||void 0===h)return;let r=f.get(t);void 0===r&&f.set(t,r=new Map);let o=r.get(n);void 0===o&&r.set(n,o=new Set),o.has(h)||(o.add(h),h.deps.push(o))}function O(t,e,n,r,o,s){const u=f.get(t);if(void 0===u)return;const i=new Set,l=new Set,a=t=>{void 0!==t&&t.forEach(t=>{t===h&&b||(t.options.computed?l.add(t):i.add(t))})};if("clear"===e)u.forEach(a);else if("length"===n&&c(t))u.forEach((t,e)=>{("length"===e||e>=r)&&a(t)});else{void 0!==n&&a(u.get(n));const r="add"===e||"delete"===e&&!c(t);(r||"set"===e&&t instanceof Map)&&a(u.get(c(t)?"length":p)),r&&t instanceof Map&&a(u.get(g))}const d=t=>{void 0!==t.options.scheduler?t.options.scheduler(t):t()};l.forEach(d),i.forEach(d)}const W=new Set(Object.getOwnPropertyNames(Symbol).map(t=>Symbol[t]).filter(s)),_=A(),j=A(!1,!0),z=A(!0),P=A(!0,!0),x={};function A(t=!1,e=!1){return function(n,r,i){const l=c(n);if(l&&o(x,r))return Reflect.get(x,r,i);const a=Reflect.get(n,r,i);return s(r)&&W.has(r)?a:e?(!t&&E(n,0,r),a):bt(a)?l?(!t&&E(n,0,r),a):a.value:(!t&&E(n,0,r),u(a)?t?dt(a):at(a):a)}}["includes","indexOf","lastIndexOf"].forEach(t=>{x[t]=function(...e){const n=yt(this);for(let t=0,e=this.length;t<e;t++)E(n,0,t+"");const r=n[t](...e);return-1===r||!1===r?n[t](...e.map(yt)):r}});const K=V(),N=V(!0);function V(t=!1){return function(e,n,r,s){const u=e[n];if(!t&&(r=yt(r),!c(e)&&bt(u)&&!bt(r)))return u.value=r,!0;const i=o(e,n),l=Reflect.set(e,n,r,s);return e===yt(s)&&(i?a(r,u)&&O(e,"set",n,r):O(e,"add",n,r)),l}}function C(t,e){const n=Reflect.has(t,e);return E(t,0,e),n}function F(t){return E(t,0,p),Reflect.ownKeys(t)}const I={get:_,set:K,deleteProperty:function(t,e){const n=o(t,e),r=Reflect.deleteProperty(t,e);return r&&n&&O(t,"delete",e,void 0),r},has:C,ownKeys:F},L={get:z,has:C,ownKeys:F,set:(t,e)=>!0,deleteProperty:(t,e)=>!0},q={...I,get:j,set:N},B={...L,get:P},D=t=>u(t)?at(t):t,G=t=>u(t)?dt(t):t,H=t=>Reflect.getPrototypeOf(t);function J(t,e,n){t=yt(t);const r=yt(e);e!==r&&E(t,0,e),E(t,0,r);const{has:o,get:c}=H(t);return o.call(t,e)?n(c.call(t,e)):o.call(t,r)?n(c.call(t,r)):void 0}function Q(t){const e=yt(this),n=yt(t);t!==n&&E(e,0,t),E(e,0,n);const r=H(e).has;return r.call(e,t)||r.call(e,n)}function T(t){return E(t=yt(t),0,p),Reflect.get(H(t),"size",t)}function U(t){return function(e,n){const r=this,o=yt(r),c=t?G:D;return!t&&E(o,0,p),H(o).forEach.call(o,(function(t,n){return e.call(r,c(t),c(n),r)}),n)}}function X(t,e){return function(...n){const r=yt(this),o=r instanceof Map,c="entries"===t||t===Symbol.iterator&&o,s="keys"===t&&o,u=H(r)[t].apply(r,n),i=e?G:D;return!e&&E(r,0,s?g:p),{next(){const{value:t,done:e}=u.next();return e?{value:t,done:e}:{value:c?[i(t[0]),i(t[1])]:i(t),done:e}},[Symbol.iterator](){return this}}}}function Y(t){return function(...e){return"delete"!==t&&this}}const Z={get(t){return J(this,t,D)},get size(){return T(this)},has:Q,add:function(t){t=yt(t);const e=yt(this),n=H(e),r=n.has.call(e,t),o=n.add.call(e,t);return r||O(e,"add",t,t),o},set:function(t,e){e=yt(e);const n=yt(this),{has:r,get:o,set:c}=H(n);let s=r.call(n,t);s||(t=yt(t),s=r.call(n,t));const u=o.call(n,t),i=c.call(n,t,e);return s?a(e,u)&&O(n,"set",t,e):O(n,"add",t,e),i},delete:function(t){const e=yt(this),{has:n,get:r,delete:o}=H(e);let c=n.call(e,t);c||(t=yt(t),c=n.call(e,t)),r&&r.call(e,t);const s=o.call(e,t);return c&&O(e,"delete",t,void 0),s},clear:function(){const t=yt(this),e=0!==t.size,n=H(t).clear.call(t);return e&&O(t,"clear",void 0,void 0),n},forEach:U(!1)},$={get(t){return J(this,t,G)},get size(){return T(this)},has:Q,add:Y("add"),set:Y("set"),delete:Y("delete"),clear:Y("clear"),forEach:U(!0)};function tt(t){return(e,n,r)=>Reflect.get(o(t,n)&&n in e?t:e,n,r)}["keys","values","entries",Symbol.iterator].forEach(t=>{Z[t]=X(t,!1),$[t]=X(t,!0)});const et={get:tt(Z)},nt={get:tt($)},rt=new WeakMap,ot=new WeakMap,ct=new WeakMap,st=new WeakMap,ut=new WeakSet,it=new Set([Set,Map,WeakMap,WeakSet]),lt=t("Object,Array,Map,Set,WeakMap,WeakSet");function at(t){return st.has(t)?t:pt(t,rt,ot,I,et)}function ft(t){return pt(t,rt,ot,q,et)}function dt(t){return pt(t,ct,st,L,nt)}function ht(t){return pt(t,ct,st,B,nt)}function pt(t,e,n,r,o){if(!u(t))return t;let c=e.get(t);if(void 0!==c)return c;if(n.has(t))return t;if((s=t)._isVue||s._isVNode||!lt(l(s))||ut.has(s)||Object.isFrozen(s))return t;var s;const i=it.has(t.constructor)?o:r;return c=new Proxy(t,i),e.set(t,c),n.set(c,t),c}function gt(t){return ot.has(t)||st.has(t)}function vt(t){return st.has(t)}function yt(t){return t=st.get(t)||t,ot.get(t)||t}function wt(t){return ut.add(t),t}const St=t=>u(t)?at(t):t;function bt(t){return!!t&&!0===t._isRef}function Rt(t){return Mt(t)}function mt(t){return Mt(t,!0)}function Mt(t,e=!1){if(bt(t))return t;e||(t=St(t));const n={_isRef:!0,get value(){return E(n,0,"value"),t},set value(r){t=e?r:St(r),O(n,"set","value",void 0)}};return n}function kt(t){return bt(t)?t.value:t}function Et(t){const{get:e,set:n}=t(()=>E(r,0,"value"),()=>O(r,"set","value")),r={_isRef:!0,get value(){return e()},set value(t){n(t)}};return r}function Ot(t){const e={};for(const n in t)e[n]=Wt(t,n);return e}function Wt(t,e){return{_isRef:!0,get value(){return t[e]},set value(n){t[e]=n}}}function _t(t){let e,r;"function"==typeof t?(e=t,r=n):(e=t.get,r=t.set);let o,c,s=!0;const u=v(e,{lazy:!0,computed:!0,scheduler:()=>{s||(s=!0,O(c,"set","value"))}});return c={_isRef:!0,effect:u,get value(){return s&&(o=u(),s=!1),E(c,0,"value"),o},set value(t){r(t)}},c}export{p as ITERATE_KEY,_t as computed,Et as customRef,v as effect,M as enableTracking,gt as isReactive,vt as isReadonly,bt as isRef,wt as markNonReactive,m as pauseTracking,at as reactive,dt as readonly,Rt as ref,k as resetTracking,ft as shallowReactive,ht as shallowReadonly,mt as shallowRef,y as stop,yt as toRaw,Wt as toRef,Ot as toRefs,E as track,O as trigger,kt as unref}; | ||
function t(t,e){const n=Object.create(null),r=t.split(",");for(let t=0;t<r.length;t++)n[r[t]]=!0;return e?t=>!!n[t.toLowerCase()]:t=>!!n[t]}const e={},n=()=>{},r=Object.prototype.hasOwnProperty,o=(t,e)=>r.call(t,e),c=Array.isArray,s=t=>"symbol"==typeof t,u=t=>null!==t&&"object"==typeof t,i=Object.prototype.toString,l=t=>(t=>i.call(t))(t).slice(8,-1),a=(t,e)=>t!==e&&(t==t||e==e),f=new WeakMap,d=[];let h;const p=Symbol(""),g=Symbol("");function v(t,n=e){(function(t){return t&&!0===t._isEffect})(t)&&(t=t.raw);const r=function(t,e){const n=function(...r){if(!n.active)return e.scheduler?void 0:t(...r);if(!d.includes(n)){S(n);try{return M(),d.push(n),h=n,t(...r)}finally{d.pop(),k(),h=d[d.length-1]}}};return n.id=w++,n._isEffect=!0,n.active=!0,n.raw=t,n.deps=[],n.options=e,n}(t,n);return n.lazy||r(),r}function y(t){t.active&&(S(t),t.options.onStop&&t.options.onStop(),t.active=!1)}let w=0;function S(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}let b=!0;const R=[];function m(){R.push(b),b=!1}function M(){R.push(b),b=!0}function k(){const t=R.pop();b=void 0===t||t}function E(t,e,n){if(!b||void 0===h)return;let r=f.get(t);void 0===r&&f.set(t,r=new Map);let o=r.get(n);void 0===o&&r.set(n,o=new Set),o.has(h)||(o.add(h),h.deps.push(o))}function O(t,e,n,r,o,s){const u=f.get(t);if(void 0===u)return;const i=new Set,l=new Set,a=t=>{void 0!==t&&t.forEach(t=>{t===h&&b||(t.options.computed?l.add(t):i.add(t))})};if("clear"===e)u.forEach(a);else if("length"===n&&c(t))u.forEach((t,e)=>{("length"===e||e>=r)&&a(t)});else{void 0!==n&&a(u.get(n));const r="add"===e||"delete"===e&&!c(t);(r||"set"===e&&t instanceof Map)&&a(u.get(c(t)?"length":p)),r&&t instanceof Map&&a(u.get(g))}const d=t=>{void 0!==t.options.scheduler?t.options.scheduler(t):t()};l.forEach(d),i.forEach(d)}const W=new Set(Object.getOwnPropertyNames(Symbol).map(t=>Symbol[t]).filter(s)),_=A(),j=A(!1,!0),z=A(!0),P=A(!0,!0),x={};function A(t=!1,e=!1){return function(n,r,i){const l=c(n);if(l&&o(x,r))return Reflect.get(x,r,i);const a=Reflect.get(n,r,i);return s(r)&&W.has(r)?a:e?(!t&&E(n,0,r),a):Rt(a)?l?(!t&&E(n,0,r),a):a.value:(!t&&E(n,0,r),u(a)?t?dt(a):at(a):a)}}["includes","indexOf","lastIndexOf"].forEach(t=>{x[t]=function(...e){const n=wt(this);for(let t=0,e=this.length;t<e;t++)E(n,0,t+"");const r=n[t](...e);return-1===r||!1===r?n[t](...e.map(wt)):r}});const K=V(),N=V(!0);function V(t=!1){return function(e,n,r,s){const u=e[n];if(!t&&(r=wt(r),!c(e)&&Rt(u)&&!Rt(r)))return u.value=r,!0;const i=o(e,n),l=Reflect.set(e,n,r,s);return e===wt(s)&&(i?a(r,u)&&O(e,"set",n,r):O(e,"add",n,r)),l}}function C(t,e){const n=Reflect.has(t,e);return E(t,0,e),n}function F(t){return E(t,0,p),Reflect.ownKeys(t)}const I={get:_,set:K,deleteProperty:function(t,e){const n=o(t,e),r=Reflect.deleteProperty(t,e);return r&&n&&O(t,"delete",e,void 0),r},has:C,ownKeys:F},L={get:z,has:C,ownKeys:F,set:(t,e)=>!0,deleteProperty:(t,e)=>!0},q={...I,get:j,set:N},B={...L,get:P},D=t=>u(t)?at(t):t,G=t=>u(t)?dt(t):t,H=t=>Reflect.getPrototypeOf(t);function J(t,e,n){t=wt(t);const r=wt(e);e!==r&&E(t,0,e),E(t,0,r);const{has:o,get:c}=H(t);return o.call(t,e)?n(c.call(t,e)):o.call(t,r)?n(c.call(t,r)):void 0}function Q(t){const e=wt(this),n=wt(t);t!==n&&E(e,0,t),E(e,0,n);const r=H(e).has;return r.call(e,t)||r.call(e,n)}function T(t){return E(t=wt(t),0,p),Reflect.get(H(t),"size",t)}function U(t){return function(e,n){const r=this,o=wt(r),c=t?G:D;return!t&&E(o,0,p),H(o).forEach.call(o,(function(t,n){return e.call(r,c(t),c(n),r)}),n)}}function X(t,e){return function(...n){const r=wt(this),o=r instanceof Map,c="entries"===t||t===Symbol.iterator&&o,s="keys"===t&&o,u=H(r)[t].apply(r,n),i=e?G:D;return!e&&E(r,0,s?g:p),{next(){const{value:t,done:e}=u.next();return e?{value:t,done:e}:{value:c?[i(t[0]),i(t[1])]:i(t),done:e}},[Symbol.iterator](){return this}}}}function Y(t){return function(...e){return"delete"!==t&&this}}const Z={get(t){return J(this,t,D)},get size(){return T(this)},has:Q,add:function(t){t=wt(t);const e=wt(this),n=H(e),r=n.has.call(e,t),o=n.add.call(e,t);return r||O(e,"add",t,t),o},set:function(t,e){e=wt(e);const n=wt(this),{has:r,get:o,set:c}=H(n);let s=r.call(n,t);s||(t=wt(t),s=r.call(n,t));const u=o.call(n,t),i=c.call(n,t,e);return s?a(e,u)&&O(n,"set",t,e):O(n,"add",t,e),i},delete:function(t){const e=wt(this),{has:n,get:r,delete:o}=H(e);let c=n.call(e,t);c||(t=wt(t),c=n.call(e,t)),r&&r.call(e,t);const s=o.call(e,t);return c&&O(e,"delete",t,void 0),s},clear:function(){const t=wt(this),e=0!==t.size,n=H(t).clear.call(t);return e&&O(t,"clear",void 0,void 0),n},forEach:U(!1)},$={get(t){return J(this,t,G)},get size(){return T(this)},has:Q,add:Y("add"),set:Y("set"),delete:Y("delete"),clear:Y("clear"),forEach:U(!0)};function tt(t){return(e,n,r)=>Reflect.get(o(t,n)&&n in e?t:e,n,r)}["keys","values","entries",Symbol.iterator].forEach(t=>{Z[t]=X(t,!1),$[t]=X(t,!0)});const et={get:tt(Z)},nt={get:tt($)},rt=new WeakMap,ot=new WeakMap,ct=new WeakMap,st=new WeakMap,ut=new WeakSet,it=new Set([Set,Map,WeakMap,WeakSet]),lt=t("Object,Array,Map,Set,WeakMap,WeakSet");function at(t){return st.has(t)?t:pt(t,rt,ot,I,et)}function ft(t){return pt(t,rt,ot,q,et)}function dt(t){return pt(t,ct,st,L,nt)}function ht(t){return pt(t,ct,st,B,nt)}function pt(t,e,n,r,o){if(!u(t))return t;let c=e.get(t);if(void 0!==c)return c;if(n.has(t))return t;if((s=t)._isVue||s._isVNode||!lt(l(s))||ut.has(s)||Object.isFrozen(s))return t;var s;const i=it.has(t.constructor)?o:r;return c=new Proxy(t,i),e.set(t,c),n.set(c,t),c}function gt(t){return t=st.get(t)||t,ot.has(t)}function vt(t){return st.has(t)}function yt(t){return st.has(t)||ot.has(t)}function wt(t){return t=st.get(t)||t,ot.get(t)||t}function St(t){return ut.add(t),t}const bt=t=>u(t)?at(t):t;function Rt(t){return!!t&&!0===t._isRef}function mt(t){return kt(t)}function Mt(t){return kt(t,!0)}function kt(t,e=!1){if(Rt(t))return t;e||(t=bt(t));const n={_isRef:!0,get value(){return E(n,0,"value"),t},set value(r){t=e?r:bt(r),O(n,"set","value",void 0)}};return n}function Et(t){return Rt(t)?t.value:t}function Ot(t){const{get:e,set:n}=t(()=>E(r,0,"value"),()=>O(r,"set","value")),r={_isRef:!0,get value(){return e()},set value(t){n(t)}};return r}function Wt(t){const e={};for(const n in t)e[n]=_t(t,n);return e}function _t(t,e){return{_isRef:!0,get value(){return t[e]},set value(n){t[e]=n}}}function jt(t){let e,r;"function"==typeof t?(e=t,r=n):(e=t.get,r=t.set);let o,c,s=!0;const u=v(e,{lazy:!0,computed:!0,scheduler:()=>{s||(s=!0,O(c,"set","value"))}});return c={_isRef:!0,effect:u,get value(){return s&&(o=u(),s=!1),E(c,0,"value"),o},set value(t){r(t)}},c}export{p as ITERATE_KEY,jt as computed,Ot as customRef,v as effect,M as enableTracking,yt as isProxy,gt as isReactive,vt as isReadonly,Rt as isRef,St as markRaw,m as pauseTracking,at as reactive,dt as readonly,mt as ref,k as resetTracking,ft as shallowReactive,ht as shallowReadonly,Mt as shallowRef,y as stop,wt as toRaw,_t as toRef,Wt as toRefs,E as track,O as trigger,Et as unref}; |
@@ -579,3 +579,3 @@ var VueReactivity = (function (exports) { | ||
// observable creation. | ||
const nonReactiveValues = new WeakSet(); | ||
const rawValues = new WeakSet(); | ||
const collectionTypes = new Set([Set, Map, WeakMap, WeakSet]); | ||
@@ -587,3 +587,3 @@ const isObservableType = /*#__PURE__*/ makeMap('Object,Array,Map,Set,WeakMap,WeakSet'); | ||
isObservableType(toRawType(value)) && | ||
!nonReactiveValues.has(value) && | ||
!rawValues.has(value) && | ||
!Object.isFrozen(value)); | ||
@@ -643,3 +643,4 @@ }; | ||
function isReactive(value) { | ||
return reactiveToRaw.has(value) || readonlyToRaw.has(value); | ||
value = readonlyToRaw.get(value) || value; | ||
return reactiveToRaw.has(value); | ||
} | ||
@@ -649,2 +650,5 @@ function isReadonly(value) { | ||
} | ||
function isProxy(value) { | ||
return readonlyToRaw.has(value) || reactiveToRaw.has(value); | ||
} | ||
function toRaw(observed) { | ||
@@ -654,4 +658,4 @@ observed = readonlyToRaw.get(observed) || observed; | ||
} | ||
function markNonReactive(value) { | ||
nonReactiveValues.add(value); | ||
function markRaw(value) { | ||
rawValues.add(value); | ||
return value; | ||
@@ -707,3 +711,3 @@ } | ||
function toRefs(object) { | ||
if ( !isReactive(object)) { | ||
if ( !isProxy(object)) { | ||
console.warn(`toRefs() expects a reactive object but received a plain one.`); | ||
@@ -781,6 +785,7 @@ } | ||
exports.enableTracking = enableTracking; | ||
exports.isProxy = isProxy; | ||
exports.isReactive = isReactive; | ||
exports.isReadonly = isReadonly; | ||
exports.isRef = isRef; | ||
exports.markNonReactive = markNonReactive; | ||
exports.markRaw = markRaw; | ||
exports.pauseTracking = pauseTracking; | ||
@@ -787,0 +792,0 @@ exports.reactive = reactive; |
@@ -1,1 +0,1 @@ | ||
var VueReactivity=function(e){"use strict";function t(e,t){const n=Object.create(null),r=e.split(",");for(let e=0;e<r.length;e++)n[r[e]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const n={},r=()=>{},o=Object.prototype.hasOwnProperty,c=(e,t)=>o.call(e,t),s=Array.isArray,u=e=>"symbol"==typeof e,a=e=>null!==e&&"object"==typeof e,i=Object.prototype.toString,l=e=>(e=>i.call(e))(e).slice(8,-1),f=(e,t)=>e!==t&&(e==e||t==t),d=new WeakMap,h=[];let p;const g=Symbol(""),v=Symbol("");function y(e,t=n){(function(e){return e&&!0===e._isEffect})(e)&&(e=e.raw);const r=function(e,t){const n=function(...r){if(!n.active)return t.scheduler?void 0:e(...r);if(!h.includes(n)){w(n);try{return b(),h.push(n),p=n,e(...r)}finally{h.pop(),m(),p=h[h.length-1]}}};return n.id=R++,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=t,n}(e,t);return t.lazy||r(),r}let R=0;function w(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let S=!0;const k=[];function b(){k.push(S),S=!0}function m(){const e=k.pop();S=void 0===e||e}function E(e,t,n){if(!S||void 0===p)return;let r=d.get(e);void 0===r&&d.set(e,r=new Map);let o=r.get(n);void 0===o&&r.set(n,o=new Set),o.has(p)||(o.add(p),p.deps.push(o))}function M(e,t,n,r,o,c){const u=d.get(e);if(void 0===u)return;const a=new Set,i=new Set,l=e=>{void 0!==e&&e.forEach(e=>{e===p&&S||(e.options.computed?i.add(e):a.add(e))})};if("clear"===t)u.forEach(l);else if("length"===n&&s(e))u.forEach((e,t)=>{("length"===t||t>=r)&&l(e)});else{void 0!==n&&l(u.get(n));const r="add"===t||"delete"===t&&!s(e);(r||"set"===t&&e instanceof Map)&&l(u.get(s(e)?"length":g)),r&&e instanceof Map&&l(u.get(v))}const f=e=>{void 0!==e.options.scheduler?e.options.scheduler(e):e()};i.forEach(f),a.forEach(f)}const O=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(u)),W=x(),_=x(!1,!0),j=x(!0),z=x(!0,!0),P={};function x(e=!1,t=!1){return function(n,r,o){const i=s(n);if(i&&c(P,r))return Reflect.get(P,r,o);const l=Reflect.get(n,r,o);return u(r)&&O.has(r)?l:t?(!e&&E(n,0,r),l):pe(l)?i?(!e&&E(n,0,r),l):l.value:(!e&&E(n,0,r),a(l)?e?le(l):ie(l):l)}}["includes","indexOf","lastIndexOf"].forEach(e=>{P[e]=function(...t){const n=de(this);for(let e=0,t=this.length;e<t;e++)E(n,0,e+"");const r=n[e](...t);return-1===r||!1===r?n[e](...t.map(de)):r}});const T=K(),A=K(!0);function K(e=!1){return function(t,n,r,o){const u=t[n];if(!e&&(r=de(r),!s(t)&&pe(u)&&!pe(r)))return u.value=r,!0;const a=c(t,n),i=Reflect.set(t,n,r,o);return t===de(o)&&(a?f(r,u)&&M(t,"set",n,r):M(t,"add",n,r)),i}}function N(e,t){const n=Reflect.has(e,t);return E(e,0,t),n}function V(e){return E(e,0,g),Reflect.ownKeys(e)}const I={get:W,set:T,deleteProperty:function(e,t){const n=c(e,t),r=Reflect.deleteProperty(e,t);return r&&n&&M(e,"delete",t,void 0),r},has:N,ownKeys:V},C={get:j,has:N,ownKeys:V,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},F={...I,get:_,set:A},L={...C,get:z},Y=e=>a(e)?ie(e):e,q=e=>a(e)?le(e):e,B=e=>Reflect.getPrototypeOf(e);function D(e,t,n){e=de(e);const r=de(t);t!==r&&E(e,0,t),E(e,0,r);const{has:o,get:c}=B(e);return o.call(e,t)?n(c.call(e,t)):o.call(e,r)?n(c.call(e,r)):void 0}function G(e){const t=de(this),n=de(e);e!==n&&E(t,0,e),E(t,0,n);const r=B(t).has;return r.call(t,e)||r.call(t,n)}function H(e){return E(e=de(e),0,g),Reflect.get(B(e),"size",e)}function J(e){return function(t,n){const r=this,o=de(r),c=e?q:Y;return!e&&E(o,0,g),B(o).forEach.call(o,(function(e,n){return t.call(r,c(e),c(n),r)}),n)}}function Q(e,t){return function(...n){const r=de(this),o=r instanceof Map,c="entries"===e||e===Symbol.iterator&&o,s="keys"===e&&o,u=B(r)[e].apply(r,n),a=t?q:Y;return!t&&E(r,0,s?v:g),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[a(e[0]),a(e[1])]:a(e),done:t}},[Symbol.iterator](){return this}}}}function U(e){return function(...t){return"delete"!==e&&this}}const X={get(e){return D(this,e,Y)},get size(){return H(this)},has:G,add:function(e){e=de(e);const t=de(this),n=B(t),r=n.has.call(t,e),o=n.add.call(t,e);return r||M(t,"add",e,e),o},set:function(e,t){t=de(t);const n=de(this),{has:r,get:o,set:c}=B(n);let s=r.call(n,e);s||(e=de(e),s=r.call(n,e));const u=o.call(n,e),a=c.call(n,e,t);return s?f(t,u)&&M(n,"set",e,t):M(n,"add",e,t),a},delete:function(e){const t=de(this),{has:n,get:r,delete:o}=B(t);let c=n.call(t,e);c||(e=de(e),c=n.call(t,e)),r&&r.call(t,e);const s=o.call(t,e);return c&&M(t,"delete",e,void 0),s},clear:function(){const e=de(this),t=0!==e.size,n=B(e).clear.call(e);return t&&M(e,"clear",void 0,void 0),n},forEach:J(!1)},Z={get(e){return D(this,e,q)},get size(){return H(this)},has:G,add:U("add"),set:U("set"),delete:U("delete"),clear:U("clear"),forEach:J(!0)};function $(e){return(t,n,r)=>Reflect.get(c(e,n)&&n in t?e:t,n,r)}["keys","values","entries",Symbol.iterator].forEach(e=>{X[e]=Q(e,!1),Z[e]=Q(e,!0)});const ee={get:$(X)},te={get:$(Z)},ne=new WeakMap,re=new WeakMap,oe=new WeakMap,ce=new WeakMap,se=new WeakSet,ue=new Set([Set,Map,WeakMap,WeakSet]),ae=t("Object,Array,Map,Set,WeakMap,WeakSet");function ie(e){return ce.has(e)?e:fe(e,ne,re,I,ee)}function le(e){return fe(e,oe,ce,C,te)}function fe(e,t,n,r,o){if(!a(e))return e;let c=t.get(e);if(void 0!==c)return c;if(n.has(e))return e;if((s=e)._isVue||s._isVNode||!ae(l(s))||se.has(s)||Object.isFrozen(s))return e;var s;const u=ue.has(e.constructor)?o:r;return c=new Proxy(e,u),t.set(e,c),n.set(c,e),c}function de(e){return e=ce.get(e)||e,re.get(e)||e}const he=e=>a(e)?ie(e):e;function pe(e){return!!e&&!0===e._isRef}function ge(e,t=!1){if(pe(e))return e;t||(e=he(e));const n={_isRef:!0,get value(){return E(n,0,"value"),e},set value(r){e=t?r:he(r),M(n,"set","value",void 0)}};return n}function ve(e,t){return{_isRef:!0,get value(){return e[t]},set value(n){e[t]=n}}}return e.ITERATE_KEY=g,e.computed=function(e){let t,n;"function"==typeof e?(t=e,n=r):(t=e.get,n=e.set);let o,c,s=!0;const u=y(t,{lazy:!0,computed:!0,scheduler:()=>{s||(s=!0,M(c,"set","value"))}});return c={_isRef:!0,effect:u,get value(){return s&&(o=u(),s=!1),E(c,0,"value"),o},set value(e){n(e)}},c},e.customRef=function(e){const{get:t,set:n}=e(()=>E(r,0,"value"),()=>M(r,"set","value")),r={_isRef:!0,get value(){return t()},set value(e){n(e)}};return r},e.effect=y,e.enableTracking=b,e.isReactive=function(e){return re.has(e)||ce.has(e)},e.isReadonly=function(e){return ce.has(e)},e.isRef=pe,e.markNonReactive=function(e){return se.add(e),e},e.pauseTracking=function(){k.push(S),S=!1},e.reactive=ie,e.readonly=le,e.ref=function(e){return ge(e)},e.resetTracking=m,e.shallowReactive=function(e){return fe(e,ne,re,F,ee)},e.shallowReadonly=function(e){return fe(e,oe,ce,L,te)},e.shallowRef=function(e){return ge(e,!0)},e.stop=function(e){e.active&&(w(e),e.options.onStop&&e.options.onStop(),e.active=!1)},e.toRaw=de,e.toRef=ve,e.toRefs=function(e){const t={};for(const n in e)t[n]=ve(e,n);return t},e.track=E,e.trigger=M,e.unref=function(e){return pe(e)?e.value:e},e}({}); | ||
var VueReactivity=function(e){"use strict";function t(e,t){const n=Object.create(null),r=e.split(",");for(let e=0;e<r.length;e++)n[r[e]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const n={},r=()=>{},o=Object.prototype.hasOwnProperty,c=(e,t)=>o.call(e,t),s=Array.isArray,u=e=>"symbol"==typeof e,a=e=>null!==e&&"object"==typeof e,i=Object.prototype.toString,l=e=>(e=>i.call(e))(e).slice(8,-1),f=(e,t)=>e!==t&&(e==e||t==t),d=new WeakMap,h=[];let p;const g=Symbol(""),v=Symbol("");function y(e,t=n){(function(e){return e&&!0===e._isEffect})(e)&&(e=e.raw);const r=function(e,t){const n=function(...r){if(!n.active)return t.scheduler?void 0:e(...r);if(!h.includes(n)){w(n);try{return b(),h.push(n),p=n,e(...r)}finally{h.pop(),m(),p=h[h.length-1]}}};return n.id=R++,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=t,n}(e,t);return t.lazy||r(),r}let R=0;function w(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let S=!0;const k=[];function b(){k.push(S),S=!0}function m(){const e=k.pop();S=void 0===e||e}function E(e,t,n){if(!S||void 0===p)return;let r=d.get(e);void 0===r&&d.set(e,r=new Map);let o=r.get(n);void 0===o&&r.set(n,o=new Set),o.has(p)||(o.add(p),p.deps.push(o))}function M(e,t,n,r,o,c){const u=d.get(e);if(void 0===u)return;const a=new Set,i=new Set,l=e=>{void 0!==e&&e.forEach(e=>{e===p&&S||(e.options.computed?i.add(e):a.add(e))})};if("clear"===t)u.forEach(l);else if("length"===n&&s(e))u.forEach((e,t)=>{("length"===t||t>=r)&&l(e)});else{void 0!==n&&l(u.get(n));const r="add"===t||"delete"===t&&!s(e);(r||"set"===t&&e instanceof Map)&&l(u.get(s(e)?"length":g)),r&&e instanceof Map&&l(u.get(v))}const f=e=>{void 0!==e.options.scheduler?e.options.scheduler(e):e()};i.forEach(f),a.forEach(f)}const O=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(u)),W=x(),_=x(!1,!0),P=x(!0),j=x(!0,!0),z={};function x(e=!1,t=!1){return function(n,r,o){const i=s(n);if(i&&c(z,r))return Reflect.get(z,r,o);const l=Reflect.get(n,r,o);return u(r)&&O.has(r)?l:t?(!e&&E(n,0,r),l):pe(l)?i?(!e&&E(n,0,r),l):l.value:(!e&&E(n,0,r),a(l)?e?le(l):ie(l):l)}}["includes","indexOf","lastIndexOf"].forEach(e=>{z[e]=function(...t){const n=de(this);for(let e=0,t=this.length;e<t;e++)E(n,0,e+"");const r=n[e](...t);return-1===r||!1===r?n[e](...t.map(de)):r}});const T=K(),A=K(!0);function K(e=!1){return function(t,n,r,o){const u=t[n];if(!e&&(r=de(r),!s(t)&&pe(u)&&!pe(r)))return u.value=r,!0;const a=c(t,n),i=Reflect.set(t,n,r,o);return t===de(o)&&(a?f(r,u)&&M(t,"set",n,r):M(t,"add",n,r)),i}}function V(e,t){const n=Reflect.has(e,t);return E(e,0,t),n}function I(e){return E(e,0,g),Reflect.ownKeys(e)}const N={get:W,set:T,deleteProperty:function(e,t){const n=c(e,t),r=Reflect.deleteProperty(e,t);return r&&n&&M(e,"delete",t,void 0),r},has:V,ownKeys:I},C={get:P,has:V,ownKeys:I,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},F={...N,get:_,set:A},L={...C,get:j},Y=e=>a(e)?ie(e):e,q=e=>a(e)?le(e):e,B=e=>Reflect.getPrototypeOf(e);function D(e,t,n){e=de(e);const r=de(t);t!==r&&E(e,0,t),E(e,0,r);const{has:o,get:c}=B(e);return o.call(e,t)?n(c.call(e,t)):o.call(e,r)?n(c.call(e,r)):void 0}function G(e){const t=de(this),n=de(e);e!==n&&E(t,0,e),E(t,0,n);const r=B(t).has;return r.call(t,e)||r.call(t,n)}function H(e){return E(e=de(e),0,g),Reflect.get(B(e),"size",e)}function J(e){return function(t,n){const r=this,o=de(r),c=e?q:Y;return!e&&E(o,0,g),B(o).forEach.call(o,(function(e,n){return t.call(r,c(e),c(n),r)}),n)}}function Q(e,t){return function(...n){const r=de(this),o=r instanceof Map,c="entries"===e||e===Symbol.iterator&&o,s="keys"===e&&o,u=B(r)[e].apply(r,n),a=t?q:Y;return!t&&E(r,0,s?v:g),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[a(e[0]),a(e[1])]:a(e),done:t}},[Symbol.iterator](){return this}}}}function U(e){return function(...t){return"delete"!==e&&this}}const X={get(e){return D(this,e,Y)},get size(){return H(this)},has:G,add:function(e){e=de(e);const t=de(this),n=B(t),r=n.has.call(t,e),o=n.add.call(t,e);return r||M(t,"add",e,e),o},set:function(e,t){t=de(t);const n=de(this),{has:r,get:o,set:c}=B(n);let s=r.call(n,e);s||(e=de(e),s=r.call(n,e));const u=o.call(n,e),a=c.call(n,e,t);return s?f(t,u)&&M(n,"set",e,t):M(n,"add",e,t),a},delete:function(e){const t=de(this),{has:n,get:r,delete:o}=B(t);let c=n.call(t,e);c||(e=de(e),c=n.call(t,e)),r&&r.call(t,e);const s=o.call(t,e);return c&&M(t,"delete",e,void 0),s},clear:function(){const e=de(this),t=0!==e.size,n=B(e).clear.call(e);return t&&M(e,"clear",void 0,void 0),n},forEach:J(!1)},Z={get(e){return D(this,e,q)},get size(){return H(this)},has:G,add:U("add"),set:U("set"),delete:U("delete"),clear:U("clear"),forEach:J(!0)};function $(e){return(t,n,r)=>Reflect.get(c(e,n)&&n in t?e:t,n,r)}["keys","values","entries",Symbol.iterator].forEach(e=>{X[e]=Q(e,!1),Z[e]=Q(e,!0)});const ee={get:$(X)},te={get:$(Z)},ne=new WeakMap,re=new WeakMap,oe=new WeakMap,ce=new WeakMap,se=new WeakSet,ue=new Set([Set,Map,WeakMap,WeakSet]),ae=t("Object,Array,Map,Set,WeakMap,WeakSet");function ie(e){return ce.has(e)?e:fe(e,ne,re,N,ee)}function le(e){return fe(e,oe,ce,C,te)}function fe(e,t,n,r,o){if(!a(e))return e;let c=t.get(e);if(void 0!==c)return c;if(n.has(e))return e;if((s=e)._isVue||s._isVNode||!ae(l(s))||se.has(s)||Object.isFrozen(s))return e;var s;const u=ue.has(e.constructor)?o:r;return c=new Proxy(e,u),t.set(e,c),n.set(c,e),c}function de(e){return e=ce.get(e)||e,re.get(e)||e}const he=e=>a(e)?ie(e):e;function pe(e){return!!e&&!0===e._isRef}function ge(e,t=!1){if(pe(e))return e;t||(e=he(e));const n={_isRef:!0,get value(){return E(n,0,"value"),e},set value(r){e=t?r:he(r),M(n,"set","value",void 0)}};return n}function ve(e,t){return{_isRef:!0,get value(){return e[t]},set value(n){e[t]=n}}}return e.ITERATE_KEY=g,e.computed=function(e){let t,n;"function"==typeof e?(t=e,n=r):(t=e.get,n=e.set);let o,c,s=!0;const u=y(t,{lazy:!0,computed:!0,scheduler:()=>{s||(s=!0,M(c,"set","value"))}});return c={_isRef:!0,effect:u,get value(){return s&&(o=u(),s=!1),E(c,0,"value"),o},set value(e){n(e)}},c},e.customRef=function(e){const{get:t,set:n}=e(()=>E(r,0,"value"),()=>M(r,"set","value")),r={_isRef:!0,get value(){return t()},set value(e){n(e)}};return r},e.effect=y,e.enableTracking=b,e.isProxy=function(e){return ce.has(e)||re.has(e)},e.isReactive=function(e){return e=ce.get(e)||e,re.has(e)},e.isReadonly=function(e){return ce.has(e)},e.isRef=pe,e.markRaw=function(e){return se.add(e),e},e.pauseTracking=function(){k.push(S),S=!1},e.reactive=ie,e.readonly=le,e.ref=function(e){return ge(e)},e.resetTracking=m,e.shallowReactive=function(e){return fe(e,ne,re,F,ee)},e.shallowReadonly=function(e){return fe(e,oe,ce,L,te)},e.shallowRef=function(e){return ge(e,!0)},e.stop=function(e){e.active&&(w(e),e.options.onStop&&e.options.onStop(),e.active=!1)},e.toRaw=de,e.toRef=ve,e.toRefs=function(e){const t={};for(const n in e)t[n]=ve(e,n);return t},e.track=E,e.trigger=M,e.unref=function(e){return pe(e)?e.value:e},e}({}); |
{ | ||
"name": "@vue/reactivity", | ||
"version": "3.0.0-alpha.13", | ||
"version": "3.0.0-beta.1", | ||
"description": "@vue/reactivity", | ||
@@ -37,4 +37,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"@vue/shared": "3.0.0-alpha.13" | ||
"@vue/shared": "3.0.0-beta.1" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
148408
3945
+ Added@vue/shared@3.0.0-beta.1(transitive)
- Removed@vue/shared@3.0.0-alpha.13(transitive)
Updated@vue/shared@3.0.0-beta.1