@vue/composition-api
Advanced tools
Comparing version 1.0.0-beta.24 to 1.0.0-beta.25
@@ -0,1 +1,6 @@ | ||
<a name="1.0.0-beta.25"></a> | ||
# [1.0.0-beta.25](https://github.com/vuejs/composition-api/compare/v1.0.0-beta.24...v1.0.0-beta.25) (2021-01-08) | ||
<a name="1.0.0-beta.24"></a> | ||
@@ -2,0 +7,0 @@ # [1.0.0-beta.24](https://github.com/vuejs/composition-api/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2021-01-06) |
@@ -352,2 +352,6 @@ import Vue, { VueConstructor, ComponentOptions, VNode, CreateElement } from 'vue'; | ||
declare const useCssModule: (name?: string) => Record<string, string>; | ||
/** | ||
* @deprecated use `useCssModule` instead. | ||
*/ | ||
declare const useCSSModule: (name?: string) => Record<string, string>; | ||
@@ -431,2 +435,2 @@ | ||
export default Plugin; | ||
export { ComponentRenderProxy, ComputedRef, DeepReadonly, FlushMode, InjectionKey, PropOptions, PropType, Ref, SetupContext, ShallowUnwrapRef, UnwrapRef, VueWatcher, WatchCallback, WatchEffect, WatchOptions, WatchOptionsBase, WatchSource, WatchStopHandle, WritableComputedRef, computed, createApp, customRef, defineComponent, del, getCurrentInstance, createElement as h, inject, isRaw, isReactive, isReadonly, isRef, markRaw, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated, provide, proxyRefs, reactive, readonly, ref, set, shallowReactive, shallowReadonly, shallowRef, toRaw, toRef, toRefs, triggerRef, unref, useCSSModule, version, warn, watch, watchEffect }; | ||
export { ComponentRenderProxy, ComputedRef, DeepReadonly, FlushMode, InjectionKey, PropOptions, PropType, Ref, SetupContext, ShallowUnwrapRef, UnwrapRef, VueWatcher, WatchCallback, WatchEffect, WatchOptions, WatchOptionsBase, WatchSource, WatchStopHandle, WritableComputedRef, computed, createApp, customRef, defineComponent, del, getCurrentInstance, createElement as h, inject, isRaw, isReactive, isReadonly, isRef, markRaw, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated, provide, proxyRefs, reactive, readonly, ref, set, shallowReactive, shallowReadonly, shallowRef, toRaw, toRef, toRefs, triggerRef, unref, useCSSModule, useCssModule, version, warn, watch, watchEffect }; |
@@ -1256,3 +1256,3 @@ 'use strict'; | ||
; | ||
var useCSSModule = function (name) { | ||
var useCssModule = function (name) { | ||
var _a; | ||
@@ -1262,3 +1262,3 @@ if (name === void 0) { name = '$style'; } | ||
if (!instance) { | ||
warn("useCSSModule must be called inside setup()"); | ||
warn("useCssModule must be called inside setup()"); | ||
return EMPTY_OBJ; | ||
@@ -1274,2 +1274,6 @@ } | ||
}; | ||
/** | ||
* @deprecated use `useCssModule` instead. | ||
*/ | ||
var useCSSModule = useCssModule; | ||
@@ -1759,3 +1763,3 @@ function createApp(rootComponent, rootProps) { | ||
var version = "1.0.0-beta.24"; | ||
var version = "1.0.0-beta.25"; | ||
// auto install when using CDN | ||
@@ -1806,2 +1810,3 @@ if (typeof window !== 'undefined' && window.Vue) { | ||
exports.useCSSModule = useCSSModule; | ||
exports.useCssModule = useCssModule; | ||
exports.version = version; | ||
@@ -1808,0 +1813,0 @@ exports.warn = warn$1; |
@@ -15,2 +15,2 @@ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("vue"));function n(e){return"function"==typeof e&&/native code/.test(e.toString())}var r="undefined"!=typeof Symbol&&n(Symbol)&&"undefined"!=typeof Reflect&&n(Reflect.ownKeys),o=function(e){return e},i={enumerable:!0,configurable:!0,get:o,set:o};function u(e,t,n){var r=n.get,u=n.set;i.get=r||o,i.set=u||o,Object.defineProperty(e,t,i)}function a(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function f(e,t){return Object.hasOwnProperty.call(e,t)}function c(e){return Array.isArray(e)}function l(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function s(e){return"[object Object]"===function(e){return Object.prototype.toString.call(e)}(e)}function v(e){return"function"==typeof e}function p(e,n){t.default.util.warn(e,n)}var d=void 0;try{var y=require("vue");y&&g(y)?d=y:y&&"default"in y&&g(y.default)&&(d=y.default)}catch(e){}var _=null,b=null;function g(e){return e&&"function"==typeof e&&"Vue"===e.name}function h(){return _}function x(e){b=e}function m(){return b?j(b):null}var w,$=new WeakMap;function j(e){if($.has(e))return $.get(e);var t={proxy:e,update:e.$forceUpdate,uid:e._uid,emit:e.$emit.bind(e),parent:null,root:null};return["data","props","attrs","refs","vnode","slots"].forEach((function(n){u(t,n,{get:function(){return e["$"+n]}})})),u(t,"isMounted",{get:function(){return e._isMounted}}),u(t,"isUnmounted",{get:function(){return e._isDestroyed}}),u(t,"isDeactivated",{get:function(){return e._inactive}}),u(t,"emitted",{get:function(){return e._events}}),$.set(e,t),e.$parent&&(t.parent=j(e.$parent)),e.$root&&(t.root=j(e.$root)),t}function O(e){var t=m();return null==t?void 0:t.proxy}function k(e,t){void 0===t&&(t={});var n=e.config.silent;e.config.silent=!0;var r=new e(t);return e.config.silent=n,r}function S(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.$scopedSlots[t]?e.$scopedSlots[t].apply(e,n):p("slots."+t+'() got called outside of the "render()" scope',e)}}var R=function(){return(R=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)}; | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */function E(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function M(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function P(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(M(arguments[t]));return e}function A(e){return r?Symbol.for(e):e}var C=A("composition-api.preFlushQueue"),D=A("composition-api.postFlushQueue"),U="composition-api.refKey",B=new WeakMap,W=new WeakMap,V=new WeakMap,z=function(e){u(this,"value",{get:e.get,set:e.set})};function F(e,t){var n=new z(e),r=Object.seal(n);return V.set(r,!0),r}function T(e){var t;if(I(e))return e;var n=Z(((t={})[U]=e,t));return F({get:function(){return n[U]},set:function(e){return n[U]=e}})}function I(e){return e instanceof z}function K(e){return I(e)?e.value:e}function q(e){if(!s(e))return e;var t={};for(var n in e)t[n]=Q(e,n);return t}function Q(e,t){var n=e[t];return I(n)?n:F({get:function(){return e[t]},set:function(n){return e[t]=n}})}function J(e){var t;return Boolean((null==e?void 0:e.__ob__)&&(null===(t=e.__ob__)||void 0===t?void 0:t.__raw__))}function N(e){var t;return Boolean((null==e?void 0:e.__ob__)&&!(null===(t=e.__ob__)||void 0===t?void 0:t.__raw__))}function G(e){if(!(!s(e)||J(e)||Array.isArray(e)||I(e)||function(e){var t=h();return t&&e instanceof t}(e)||B.has(e))){B.set(e,!0);for(var t=Object.keys(e),n=0;n<t.length;n++)H(e,t[n])}}function H(e,t,n){if("__ob__"!==t&&!J(e[t])){var r,o,i=Object.getOwnPropertyDescriptor(e,t);if(i){if(!1===i.configurable)return;r=i.get,o=i.set,r&&!o||2!==arguments.length||(n=e[t])}G(n),Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var o=r?r.call(e):n;return t!==U&&I(o)?o.value:o},set:function(i){if(!r||o){var u=r?r.call(e):n;t!==U&&I(u)&&!I(i)?u.value=i:o?o.call(e,i):n=i,G(i)}}})}}function L(e){var t,n=_||d;n.observable?t=n.observable(e):t=k(n,{data:{$$state:e}})._data.$$state;return f(t,"__ob__")||a(t,"__ob__",function(e){void 0===e&&(e={});return{value:e,dep:{notify:o,depend:o,addSub:o,removeSub:o}}}(t)),t}function X(){return L({}).__ob__}function Y(e){var t,n;if(!s(e)&&!c(e)||J(e)||!Object.isExtensible(e))return e;var r=L({});G(r);var o=r.__ob__,i=function(t){var n,i,u=e[t],a=Object.getOwnPropertyDescriptor(e,t);if(a){if(!1===a.configurable)return"continue";n=a.get,i=a.set}Object.defineProperty(r,t,{enumerable:!0,configurable:!0,get:function(){var t,r=n?n.call(e):u;return null===(t=o.dep)||void 0===t||t.depend(),r},set:function(t){var r;n&&!i||(i?i.call(e,t):u=t,null===(r=o.dep)||void 0===r||r.notify())}})};try{for(var u=E(Object.keys(e)),a=u.next();!a.done;a=u.next()){i(a.value)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return r}function Z(e){if(!s(e)&&!c(e)||J(e)||!Object.isExtensible(e))return e;var t=L(e);return G(t),t}function ee(e){return function(t){var n,r=O(((n=e)[0].toUpperCase(),n.slice(1)));r&&function(e,t,n,r){var o=t.$options,i=e.config.optionMergeStrategies[n];o[n]=i(o[n],function(e,t){return function(){for(var n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=null===(n=m())||void 0===n?void 0:n.proxy;x(e);try{return t.apply(void 0,P(r))}finally{x(i)}}}(t,r))}(h(),r,e,t)}}var te,ne=ee("beforeMount"),re=ee("mounted"),oe=ee("beforeUpdate"),ie=ee("updated"),ue=ee("beforeDestroy"),ae=ee("destroyed"),fe=ee("errorCaptured"),ce=ee("activated"),le=ee("deactivated"),se=ee("serverPrefetch");function ve(){ye(this,C)}function pe(){ye(this,D)}function de(){var e,t=null===(e=m())||void 0===e?void 0:e.proxy;return t?function(e){return void 0!==e[C]}(t)||function(e){e[C]=[],e[D]=[],e.$on("hook:beforeUpdate",ve),e.$on("hook:updated",pe)}(t):(te||(te=k(h())),t=te),t}function ye(e,t){for(var n=e[t],r=0;r<n.length;r++)n[r]();n.length=0}function _e(e,t,n){var r=function(){e.$nextTick((function(){e[C].length&&ye(e,C),e[D].length&&ye(e,D)}))};switch(n){case"pre":r(),e[C].push(t);break;case"post":r(),e[D].push(t);break;default:!function(e,t){if(!e)throw new Error("[vue-composition-api] "+t)}(!1,'flush must be one of ["post", "pre", "sync"], but got '+n)}}function be(e,t){var n=e.teardown;e.teardown=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];n.apply(e,r),t()}}function ge(e,t,n,r){var i,u,a=r.flush,f="sync"===a,c=function(e){u=function(){try{e()}catch(e){!function(e,t,n){if("undefined"==typeof window||"undefined"==typeof console)throw e;console.error(e)}(e)}}},l=function(){u&&(u(),u=null)},s=function(t){return f||e===te?t:function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return _e(e,(function(){t.apply(void 0,P(n))}),a)}};if(null===n){var d=!1,y=function(e,t,n,r){var o=e._watchers.length;return e.$watch(t,n,{immediate:r.immediateInvokeCallback,deep:r.deep,lazy:r.noRun,sync:r.sync,before:r.before}),e._watchers[o]}(e,(function(){if(!d)try{d=!0,t(c)}finally{d=!1}}),o,{deep:r.deep||!1,sync:f,before:l});be(y,l),y.lazy=!1;var _=y.get.bind(y);return y.get=s(_),function(){y.teardown()}}var b,g=r.deep;Array.isArray(t)?b=function(){return t.map((function(e){return I(e)?e.value:e()}))}:I(t)?b=function(){return t.value}:N(t)?(b=function(){return t},g=!0):v(t)?b=t:(b=o,p("Invalid watch source: "+JSON.stringify(t)+".\n A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.",e));var h=function(e,t){l(),n(e,t,c)},x=s(h);if(r.immediate){var m=x,w=function(e,t){w=m,h(e,t)};x=function(e,t){w(e,t)}}var $=e.$watch(b,x,{immediate:r.immediate,deep:g,sync:f}),j=e._watchers[e._watchers.length-1];return N(j.value)&&(null===(i=j.value.__ob__)||void 0===i?void 0:i.dep)&&g&&j.value.__ob__.dep.addSub({update:function(){j.run()}}),be(j,l),function(){$()}}var he={};var xe={};var me;var we={set:function(e,t,n){(e.__composition_api_state__=e.__composition_api_state__||{})[t]=n},get:function(e,t){return(e.__composition_api_state__||{})[t]}};function $e(e){var t=we.get(e,"rawBindings")||{};if(t&&Object.keys(t).length){for(var n=e.$refs,r=we.get(e,"refs")||[],o=0;o<r.length;o++){var i=t[f=r[o]];!n[f]&&i&&I(i)&&(i.value=null)}var u=Object.keys(n),a=[];for(o=0;o<u.length;o++){var f;i=t[f=u[o]];n[f]&&i&&I(i)&&(i.value=n[f],a.push(f))}we.set(e,"refs",a)}}function je(e,t){var n=e.$options._parentVnode;if(n){for(var r=we.get(e,"slots")||[],o=function(e,t){var n;if(e){if(e._normalized)return e._normalized;for(var r in n={},e)e[r]&&"$"!==r[0]&&(n[r]=!0)}else n={};for(var r in t)r in n||(n[r]=!0);return n}(n.data.scopedSlots,e.$slots),i=0;i<r.length;i++){o[a=r[i]]||delete t[a]}var u=Object.keys(o);for(i=0;i<u.length;i++){var a;t[a=u[i]]||(t[a]=S(e,a))}we.set(e,"slots",u)}}function Oe(e,t,n){var r=b;x(e);try{return t(e)}catch(e){if(!n)throw e;n(e)}finally{x(r)}}function ke(e){function t(e){if(s(e)&&!I(e)&&!N(e)&&!J(e)){var n=h().util.defineReactive;Object.keys(e).forEach((function(r){var o=e[r];n(e,r,o),o&&t(o)}))}}function n(e,t){return void 0===t&&(t=new Map),t.has(e)?t.get(e):(t.set(e,!1),Array.isArray(e)&&N(e)?(t.set(e,!0),!0):!(!s(e)||J(e))&&Object.keys(e).some((function(r){return n(e[r],t)})))}e.mixin({beforeCreate:function(){var e=this,r=e.$options,o=r.setup,i=r.render;i&&(r.render=function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return Oe(e,(function(){return i.apply(t,n)}))});if(!o)return;if("function"!=typeof o)return;var l=r.data;r.data=function(){return function(e,r){void 0===r&&(r={});var o,i=e.$options.setup,l=function(e){var t={slots:{}},n=["attrs"],r=["emit"];return["root","parent","refs","listeners","isServer","ssrContext"].forEach((function(n){var r="$"+n;u(t,n,{get:function(){return e[r]},set:function(){p("Cannot assign to '"+n+"' because it is a read-only property",e)}})})),n.forEach((function(n){var r="$"+n;u(t,n,{get:function(){var t,n,o=Z({}),i=e[r],a=function(t){u(o,t,{get:function(){return e[r][t]}})};try{for(var f=E(Object.keys(i)),c=f.next();!c.done;c=f.next()){a(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}return o},set:function(){p("Cannot assign to '"+n+"' because it is a read-only property",e)}})})),r.forEach((function(n){var r="$"+n;u(t,n,{get:function(){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];e[r].apply(e,t)}}})})),t}(e);if(a(r,"__ob__",X()),je(e,l.slots),Oe(e,(function(){o=i(r,l)})),!o)return;if(v(o)){var d=o;return void(e.$options.render=function(){return je(e,l.slots),Oe(e,(function(){return d()}))})}if(s(o)){N(o)&&(o=q(o)),we.set(e,"rawBindings",o);var y=o;Object.keys(y).forEach((function(r){var o,i=y[r];I(i)||(N(i)?c(i)&&(i=T(i)):v(i)?i=i.bind(e):null===(o=i)||"object"!=typeof o?i=T(i):n(i)&&t(i)),function(e,t,n){var r=e.$options.props;t in e||r&&f(r,t)||(I(n)?u(e,t,{get:function(){return n.value},set:function(e){n.value=e}}):e[t]=n)}(e,r,i)}))}}(e,e.$props),"function"==typeof l?l.call(e,e):l||{}}},mounted:function(){$e(this)},updated:function(){$e(this)}})}function Se(e,t){if(!e)return t;if(!t)return e;for(var n,o,i,u=r?Reflect.ownKeys(e):Object.keys(e),a=0;a<u.length;a++)"__ob__"!==(n=u[a])&&(o=t[n],i=e[n],f(t,n)?o!==i&&s(o)&&!I(o)&&s(i)&&!I(i)&&Se(i,o):t[n]=i);return t}function Re(e){(function(e){return f(e,"__composition_api_installed__")})(e)||(e.config.optionMergeStrategies.setup=function(e,t){return function(n,r){return Se("function"==typeof e?e(n,r)||{}:void 0,"function"==typeof t?t(n,r)||{}:void 0)}},function(e){_=e,Object.defineProperty(e,"__composition_api_installed__",{configurable:!0,writable:!0,value:!0})}(e),ke(e))}var Ee={install:function(e){return Re(e)}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(Ee),exports.computed=function(e){var t,n,r,i,u,a=null===(t=m())||void 0===t?void 0:t.proxy;if("function"==typeof e?n=e:(n=e.get,r=e.set),a&&!a.$isServer){var f,c=function(){if(!w){var e=k(h(),{computed:{value:function(){return 0}}}),t=e._computedWatchers.value.constructor,n=e._data.__ob__.dep.constructor;w={Watcher:t,Dep:n},e.$destroy()}return w}(),l=c.Watcher,s=c.Dep;u=function(){return f||(f=new l(a,n,o,{lazy:!0})),f.dirty&&f.evaluate(),s.target&&f.depend(),f.value},i=function(e){r&&r(e)}}else{var v=k(h(),{computed:{$$state:{get:n,set:r}}});a&&a.$on("hook:destroyed",(function(){return v.$destroy()})),u=function(){return v.$$state},i=function(e){v.$$state=e}}return F({get:u,set:i})},exports.createApp=function(e,t){void 0===t&&(t=void 0);var n=h(),r=void 0;return{config:n.config,use:n.use.bind(n),mixin:n.mixin.bind(n),component:n.component.bind(n),directive:n.directive.bind(n),mount:function(o,i){return r||((r=new n(R({propsData:t},e))).$mount(o,i),r)},unmount:function(){r&&(r.$destroy(),r=void 0)}}},exports.customRef=function(e){var t=T(0);return F(e((function(){t.value}),(function(){++t.value})))},exports.default=Ee,exports.defineComponent=function(e){return e},exports.del=function(e,t){if(h().util.warn,Array.isArray(e)&&l(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount||f(e,t)&&(delete e[t],n&&n.dep.notify())}},exports.getCurrentInstance=m,exports.h=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=null===(e=m())||void 0===e?void 0:e.proxy;return r?r.$createElement.apply(r,t):(p("`createElement()` has been called outside of render function."),me||(me=k(h()).$createElement),me.apply(me,t))},exports.inject=function(e,t,n){var r;if(void 0===n&&(n=!1),!e)return t;var o=null===(r=m())||void 0===r?void 0:r.proxy;if(o){var i=function(e,t){for(var n=t;n;){if(n._provided&&f(n._provided,e))return n._provided[e];n=n.$parent}return he}(e,o);return i!==he?i:n&&v(t)?t():t}p("inject() can only be used inside setup() or functional components.")},exports.isRaw=J,exports.isReactive=N,exports.isReadonly=function(e){return V.has(e)},exports.isRef=I,exports.markRaw=function(e){if(!s(e)&&!c(e)||!Object.isExtensible(e))return e;var t=X();return t.__raw__=!0,a(e,"__ob__",t),W.set(e,!0),e},exports.nextTick=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return null===(e=h())||void 0===e?void 0:e.nextTick.apply(this,t)},exports.onActivated=ce,exports.onBeforeMount=ne,exports.onBeforeUnmount=ue,exports.onBeforeUpdate=oe,exports.onDeactivated=le,exports.onErrorCaptured=fe,exports.onMounted=re,exports.onServerPrefetch=se,exports.onUnmounted=ae,exports.onUpdated=ie,exports.provide=function(e,t){var n=O();if(n){if(!n._provided){var r={};Object.defineProperty(n,"_provided",{get:function(){return r},set:function(e){return Object.assign(r,e)}})}n._provided[e]=t}},exports.proxyRefs=function(e){var t,n,r;if(N(e))return e;var o=Z(((t={})[U]=e,t)),i=function(e){u(o,e,{get:function(){return I(o[e])?o[e].value:o[e]},set:function(t){if(I(o[e]))return o[e].value=K(t);o[e]=K(t)}})};try{for(var a=E(Object.keys(e)),f=a.next();!f.done;f=a.next()){i(f.value)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},exports.reactive=Z,exports.readonly=function(e){return e},exports.ref=T,exports.set=function(e,t,n){var r=h().util,o=(r.warn,r.defineReactive);if(c(e)&&l(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n,n;var i=e.__ob__;return e._isVue||i&&i.vmCount?n:i?(o(i.value,t,n),H(e,t,n),i.dep.notify(),n):(e[t]=n,n)},exports.shallowReactive=Y,exports.shallowReadonly=function(e){var t,n;if(!s(e)&&!c(e)||!Object.isExtensible(e))return e;var r={},o=Z({}).__ob__,i=function(t){var n,i=e[t],u=Object.getOwnPropertyDescriptor(e,t);if(u){if(!1===u.configurable)return"continue";n=u.get}Object.defineProperty(r,t,{enumerable:!0,configurable:!0,get:function(){var t=n?n.call(e):i;return o.dep.depend(),t},set:function(e){}})};try{for(var u=E(Object.keys(e)),a=u.next();!a.done;a=u.next()){i(a.value)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return V.set(r,!0),r},exports.shallowRef=function(e){var t;if(I(e))return e;var n=Y(((t={})[U]=e,t));return F({get:function(){return n[U]},set:function(e){return n[U]=e}})},exports.toRaw=function(e){var t,n;return J(e)||!Object.isExtensible(e)?e:(null===(n=null===(t=e)||void 0===t?void 0:t.__ob__)||void 0===n?void 0:n.value)||e},exports.toRef=Q,exports.toRefs=q,exports.triggerRef=function(e){I(e)&&(e.value=e.value)},exports.unref=K,exports.useCSSModule=function(e){var t;void 0===e&&(e="$style");var n=m();if(!n)return xe;var r=null===(t=n.proxy)||void 0===t?void 0:t[e];return r||xe},exports.version="1.0.0-beta.24",exports.warn=function(e){var t;p(e,null===(t=m())||void 0===t?void 0:t.proxy)},exports.watch=function(e,t,n){var r=null;"function"==typeof t?r=t:(n=t,r=null);var o=function(e){return R({immediate:!1,deep:!1,flush:"pre"},e)}(n);return ge(de(),e,r,o)},exports.watchEffect=function(e,t){var n=function(e){return R({immediate:!0,deep:!1,flush:"pre"},e)}(t);return ge(de(),e,null,n)}; | ||
***************************************************************************** */function E(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function M(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function P(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(M(arguments[t]));return e}function C(e){return r?Symbol.for(e):e}var A=C("composition-api.preFlushQueue"),D=C("composition-api.postFlushQueue"),U="composition-api.refKey",B=new WeakMap,W=new WeakMap,V=new WeakMap,z=function(e){u(this,"value",{get:e.get,set:e.set})};function F(e,t){var n=new z(e),r=Object.seal(n);return V.set(r,!0),r}function T(e){var t;if(I(e))return e;var n=Z(((t={})[U]=e,t));return F({get:function(){return n[U]},set:function(e){return n[U]=e}})}function I(e){return e instanceof z}function K(e){return I(e)?e.value:e}function q(e){if(!s(e))return e;var t={};for(var n in e)t[n]=Q(e,n);return t}function Q(e,t){var n=e[t];return I(n)?n:F({get:function(){return e[t]},set:function(n){return e[t]=n}})}function J(e){var t;return Boolean((null==e?void 0:e.__ob__)&&(null===(t=e.__ob__)||void 0===t?void 0:t.__raw__))}function N(e){var t;return Boolean((null==e?void 0:e.__ob__)&&!(null===(t=e.__ob__)||void 0===t?void 0:t.__raw__))}function G(e){if(!(!s(e)||J(e)||Array.isArray(e)||I(e)||function(e){var t=h();return t&&e instanceof t}(e)||B.has(e))){B.set(e,!0);for(var t=Object.keys(e),n=0;n<t.length;n++)H(e,t[n])}}function H(e,t,n){if("__ob__"!==t&&!J(e[t])){var r,o,i=Object.getOwnPropertyDescriptor(e,t);if(i){if(!1===i.configurable)return;r=i.get,o=i.set,r&&!o||2!==arguments.length||(n=e[t])}G(n),Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var o=r?r.call(e):n;return t!==U&&I(o)?o.value:o},set:function(i){if(!r||o){var u=r?r.call(e):n;t!==U&&I(u)&&!I(i)?u.value=i:o?o.call(e,i):n=i,G(i)}}})}}function L(e){var t,n=_||d;n.observable?t=n.observable(e):t=k(n,{data:{$$state:e}})._data.$$state;return f(t,"__ob__")||a(t,"__ob__",function(e){void 0===e&&(e={});return{value:e,dep:{notify:o,depend:o,addSub:o,removeSub:o}}}(t)),t}function X(){return L({}).__ob__}function Y(e){var t,n;if(!s(e)&&!c(e)||J(e)||!Object.isExtensible(e))return e;var r=L({});G(r);var o=r.__ob__,i=function(t){var n,i,u=e[t],a=Object.getOwnPropertyDescriptor(e,t);if(a){if(!1===a.configurable)return"continue";n=a.get,i=a.set}Object.defineProperty(r,t,{enumerable:!0,configurable:!0,get:function(){var t,r=n?n.call(e):u;return null===(t=o.dep)||void 0===t||t.depend(),r},set:function(t){var r;n&&!i||(i?i.call(e,t):u=t,null===(r=o.dep)||void 0===r||r.notify())}})};try{for(var u=E(Object.keys(e)),a=u.next();!a.done;a=u.next()){i(a.value)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return r}function Z(e){if(!s(e)&&!c(e)||J(e)||!Object.isExtensible(e))return e;var t=L(e);return G(t),t}function ee(e){return function(t){var n,r=O(((n=e)[0].toUpperCase(),n.slice(1)));r&&function(e,t,n,r){var o=t.$options,i=e.config.optionMergeStrategies[n];o[n]=i(o[n],function(e,t){return function(){for(var n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=null===(n=m())||void 0===n?void 0:n.proxy;x(e);try{return t.apply(void 0,P(r))}finally{x(i)}}}(t,r))}(h(),r,e,t)}}var te,ne=ee("beforeMount"),re=ee("mounted"),oe=ee("beforeUpdate"),ie=ee("updated"),ue=ee("beforeDestroy"),ae=ee("destroyed"),fe=ee("errorCaptured"),ce=ee("activated"),le=ee("deactivated"),se=ee("serverPrefetch");function ve(){ye(this,A)}function pe(){ye(this,D)}function de(){var e,t=null===(e=m())||void 0===e?void 0:e.proxy;return t?function(e){return void 0!==e[A]}(t)||function(e){e[A]=[],e[D]=[],e.$on("hook:beforeUpdate",ve),e.$on("hook:updated",pe)}(t):(te||(te=k(h())),t=te),t}function ye(e,t){for(var n=e[t],r=0;r<n.length;r++)n[r]();n.length=0}function _e(e,t,n){var r=function(){e.$nextTick((function(){e[A].length&&ye(e,A),e[D].length&&ye(e,D)}))};switch(n){case"pre":r(),e[A].push(t);break;case"post":r(),e[D].push(t);break;default:!function(e,t){if(!e)throw new Error("[vue-composition-api] "+t)}(!1,'flush must be one of ["post", "pre", "sync"], but got '+n)}}function be(e,t){var n=e.teardown;e.teardown=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];n.apply(e,r),t()}}function ge(e,t,n,r){var i,u,a=r.flush,f="sync"===a,c=function(e){u=function(){try{e()}catch(e){!function(e,t,n){if("undefined"==typeof window||"undefined"==typeof console)throw e;console.error(e)}(e)}}},l=function(){u&&(u(),u=null)},s=function(t){return f||e===te?t:function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return _e(e,(function(){t.apply(void 0,P(n))}),a)}};if(null===n){var d=!1,y=function(e,t,n,r){var o=e._watchers.length;return e.$watch(t,n,{immediate:r.immediateInvokeCallback,deep:r.deep,lazy:r.noRun,sync:r.sync,before:r.before}),e._watchers[o]}(e,(function(){if(!d)try{d=!0,t(c)}finally{d=!1}}),o,{deep:r.deep||!1,sync:f,before:l});be(y,l),y.lazy=!1;var _=y.get.bind(y);return y.get=s(_),function(){y.teardown()}}var b,g=r.deep;Array.isArray(t)?b=function(){return t.map((function(e){return I(e)?e.value:e()}))}:I(t)?b=function(){return t.value}:N(t)?(b=function(){return t},g=!0):v(t)?b=t:(b=o,p("Invalid watch source: "+JSON.stringify(t)+".\n A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.",e));var h=function(e,t){l(),n(e,t,c)},x=s(h);if(r.immediate){var m=x,w=function(e,t){w=m,h(e,t)};x=function(e,t){w(e,t)}}var $=e.$watch(b,x,{immediate:r.immediate,deep:g,sync:f}),j=e._watchers[e._watchers.length-1];return N(j.value)&&(null===(i=j.value.__ob__)||void 0===i?void 0:i.dep)&&g&&j.value.__ob__.dep.addSub({update:function(){j.run()}}),be(j,l),function(){$()}}var he={};var xe={},me=function(e){var t;void 0===e&&(e="$style");var n=m();if(!n)return xe;var r=null===(t=n.proxy)||void 0===t?void 0:t[e];return r||xe},we=me;var $e;var je={set:function(e,t,n){(e.__composition_api_state__=e.__composition_api_state__||{})[t]=n},get:function(e,t){return(e.__composition_api_state__||{})[t]}};function Oe(e){var t=je.get(e,"rawBindings")||{};if(t&&Object.keys(t).length){for(var n=e.$refs,r=je.get(e,"refs")||[],o=0;o<r.length;o++){var i=t[f=r[o]];!n[f]&&i&&I(i)&&(i.value=null)}var u=Object.keys(n),a=[];for(o=0;o<u.length;o++){var f;i=t[f=u[o]];n[f]&&i&&I(i)&&(i.value=n[f],a.push(f))}je.set(e,"refs",a)}}function ke(e,t){var n=e.$options._parentVnode;if(n){for(var r=je.get(e,"slots")||[],o=function(e,t){var n;if(e){if(e._normalized)return e._normalized;for(var r in n={},e)e[r]&&"$"!==r[0]&&(n[r]=!0)}else n={};for(var r in t)r in n||(n[r]=!0);return n}(n.data.scopedSlots,e.$slots),i=0;i<r.length;i++){o[a=r[i]]||delete t[a]}var u=Object.keys(o);for(i=0;i<u.length;i++){var a;t[a=u[i]]||(t[a]=S(e,a))}je.set(e,"slots",u)}}function Se(e,t,n){var r=b;x(e);try{return t(e)}catch(e){if(!n)throw e;n(e)}finally{x(r)}}function Re(e){function t(e){if(s(e)&&!I(e)&&!N(e)&&!J(e)){var n=h().util.defineReactive;Object.keys(e).forEach((function(r){var o=e[r];n(e,r,o),o&&t(o)}))}}function n(e,t){return void 0===t&&(t=new Map),t.has(e)?t.get(e):(t.set(e,!1),Array.isArray(e)&&N(e)?(t.set(e,!0),!0):!(!s(e)||J(e))&&Object.keys(e).some((function(r){return n(e[r],t)})))}e.mixin({beforeCreate:function(){var e=this,r=e.$options,o=r.setup,i=r.render;i&&(r.render=function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return Se(e,(function(){return i.apply(t,n)}))});if(!o)return;if("function"!=typeof o)return;var l=r.data;r.data=function(){return function(e,r){void 0===r&&(r={});var o,i=e.$options.setup,l=function(e){var t={slots:{}},n=["attrs"],r=["emit"];return["root","parent","refs","listeners","isServer","ssrContext"].forEach((function(n){var r="$"+n;u(t,n,{get:function(){return e[r]},set:function(){p("Cannot assign to '"+n+"' because it is a read-only property",e)}})})),n.forEach((function(n){var r="$"+n;u(t,n,{get:function(){var t,n,o=Z({}),i=e[r],a=function(t){u(o,t,{get:function(){return e[r][t]}})};try{for(var f=E(Object.keys(i)),c=f.next();!c.done;c=f.next()){a(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}return o},set:function(){p("Cannot assign to '"+n+"' because it is a read-only property",e)}})})),r.forEach((function(n){var r="$"+n;u(t,n,{get:function(){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];e[r].apply(e,t)}}})})),t}(e);if(a(r,"__ob__",X()),ke(e,l.slots),Se(e,(function(){o=i(r,l)})),!o)return;if(v(o)){var d=o;return void(e.$options.render=function(){return ke(e,l.slots),Se(e,(function(){return d()}))})}if(s(o)){N(o)&&(o=q(o)),je.set(e,"rawBindings",o);var y=o;Object.keys(y).forEach((function(r){var o,i=y[r];I(i)||(N(i)?c(i)&&(i=T(i)):v(i)?i=i.bind(e):null===(o=i)||"object"!=typeof o?i=T(i):n(i)&&t(i)),function(e,t,n){var r=e.$options.props;t in e||r&&f(r,t)||(I(n)?u(e,t,{get:function(){return n.value},set:function(e){n.value=e}}):e[t]=n)}(e,r,i)}))}}(e,e.$props),"function"==typeof l?l.call(e,e):l||{}}},mounted:function(){Oe(this)},updated:function(){Oe(this)}})}function Ee(e,t){if(!e)return t;if(!t)return e;for(var n,o,i,u=r?Reflect.ownKeys(e):Object.keys(e),a=0;a<u.length;a++)"__ob__"!==(n=u[a])&&(o=t[n],i=e[n],f(t,n)?o!==i&&s(o)&&!I(o)&&s(i)&&!I(i)&&Ee(i,o):t[n]=i);return t}function Me(e){(function(e){return f(e,"__composition_api_installed__")})(e)||(e.config.optionMergeStrategies.setup=function(e,t){return function(n,r){return Ee("function"==typeof e?e(n,r)||{}:void 0,"function"==typeof t?t(n,r)||{}:void 0)}},function(e){_=e,Object.defineProperty(e,"__composition_api_installed__",{configurable:!0,writable:!0,value:!0})}(e),Re(e))}var Pe={install:function(e){return Me(e)}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(Pe),exports.computed=function(e){var t,n,r,i,u,a=null===(t=m())||void 0===t?void 0:t.proxy;if("function"==typeof e?n=e:(n=e.get,r=e.set),a&&!a.$isServer){var f,c=function(){if(!w){var e=k(h(),{computed:{value:function(){return 0}}}),t=e._computedWatchers.value.constructor,n=e._data.__ob__.dep.constructor;w={Watcher:t,Dep:n},e.$destroy()}return w}(),l=c.Watcher,s=c.Dep;u=function(){return f||(f=new l(a,n,o,{lazy:!0})),f.dirty&&f.evaluate(),s.target&&f.depend(),f.value},i=function(e){r&&r(e)}}else{var v=k(h(),{computed:{$$state:{get:n,set:r}}});a&&a.$on("hook:destroyed",(function(){return v.$destroy()})),u=function(){return v.$$state},i=function(e){v.$$state=e}}return F({get:u,set:i})},exports.createApp=function(e,t){void 0===t&&(t=void 0);var n=h(),r=void 0;return{config:n.config,use:n.use.bind(n),mixin:n.mixin.bind(n),component:n.component.bind(n),directive:n.directive.bind(n),mount:function(o,i){return r||((r=new n(R({propsData:t},e))).$mount(o,i),r)},unmount:function(){r&&(r.$destroy(),r=void 0)}}},exports.customRef=function(e){var t=T(0);return F(e((function(){t.value}),(function(){++t.value})))},exports.default=Pe,exports.defineComponent=function(e){return e},exports.del=function(e,t){if(h().util.warn,Array.isArray(e)&&l(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount||f(e,t)&&(delete e[t],n&&n.dep.notify())}},exports.getCurrentInstance=m,exports.h=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=null===(e=m())||void 0===e?void 0:e.proxy;return r?r.$createElement.apply(r,t):(p("`createElement()` has been called outside of render function."),$e||($e=k(h()).$createElement),$e.apply($e,t))},exports.inject=function(e,t,n){var r;if(void 0===n&&(n=!1),!e)return t;var o=null===(r=m())||void 0===r?void 0:r.proxy;if(o){var i=function(e,t){for(var n=t;n;){if(n._provided&&f(n._provided,e))return n._provided[e];n=n.$parent}return he}(e,o);return i!==he?i:n&&v(t)?t():t}p("inject() can only be used inside setup() or functional components.")},exports.isRaw=J,exports.isReactive=N,exports.isReadonly=function(e){return V.has(e)},exports.isRef=I,exports.markRaw=function(e){if(!s(e)&&!c(e)||!Object.isExtensible(e))return e;var t=X();return t.__raw__=!0,a(e,"__ob__",t),W.set(e,!0),e},exports.nextTick=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return null===(e=h())||void 0===e?void 0:e.nextTick.apply(this,t)},exports.onActivated=ce,exports.onBeforeMount=ne,exports.onBeforeUnmount=ue,exports.onBeforeUpdate=oe,exports.onDeactivated=le,exports.onErrorCaptured=fe,exports.onMounted=re,exports.onServerPrefetch=se,exports.onUnmounted=ae,exports.onUpdated=ie,exports.provide=function(e,t){var n=O();if(n){if(!n._provided){var r={};Object.defineProperty(n,"_provided",{get:function(){return r},set:function(e){return Object.assign(r,e)}})}n._provided[e]=t}},exports.proxyRefs=function(e){var t,n,r;if(N(e))return e;var o=Z(((t={})[U]=e,t)),i=function(e){u(o,e,{get:function(){return I(o[e])?o[e].value:o[e]},set:function(t){if(I(o[e]))return o[e].value=K(t);o[e]=K(t)}})};try{for(var a=E(Object.keys(e)),f=a.next();!f.done;f=a.next()){i(f.value)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},exports.reactive=Z,exports.readonly=function(e){return e},exports.ref=T,exports.set=function(e,t,n){var r=h().util,o=(r.warn,r.defineReactive);if(c(e)&&l(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n,n;var i=e.__ob__;return e._isVue||i&&i.vmCount?n:i?(o(i.value,t,n),H(e,t,n),i.dep.notify(),n):(e[t]=n,n)},exports.shallowReactive=Y,exports.shallowReadonly=function(e){var t,n;if(!s(e)&&!c(e)||!Object.isExtensible(e))return e;var r={},o=Z({}).__ob__,i=function(t){var n,i=e[t],u=Object.getOwnPropertyDescriptor(e,t);if(u){if(!1===u.configurable)return"continue";n=u.get}Object.defineProperty(r,t,{enumerable:!0,configurable:!0,get:function(){var t=n?n.call(e):i;return o.dep.depend(),t},set:function(e){}})};try{for(var u=E(Object.keys(e)),a=u.next();!a.done;a=u.next()){i(a.value)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return V.set(r,!0),r},exports.shallowRef=function(e){var t;if(I(e))return e;var n=Y(((t={})[U]=e,t));return F({get:function(){return n[U]},set:function(e){return n[U]=e}})},exports.toRaw=function(e){var t,n;return J(e)||!Object.isExtensible(e)?e:(null===(n=null===(t=e)||void 0===t?void 0:t.__ob__)||void 0===n?void 0:n.value)||e},exports.toRef=Q,exports.toRefs=q,exports.triggerRef=function(e){I(e)&&(e.value=e.value)},exports.unref=K,exports.useCSSModule=we,exports.useCssModule=me,exports.version="1.0.0-beta.25",exports.warn=function(e){var t;p(e,null===(t=m())||void 0===t?void 0:t.proxy)},exports.watch=function(e,t,n){var r=null;"function"==typeof t?r=t:(n=t,r=null);var o=function(e){return R({immediate:!1,deep:!1,flush:"pre"},e)}(n);return ge(de(),e,r,o)},exports.watchEffect=function(e,t){var n=function(e){return R({immediate:!0,deep:!1,flush:"pre"},e)}(t);return ge(de(),e,null,n)}; |
@@ -1249,3 +1249,3 @@ import Vue from 'vue'; | ||
: {}; | ||
var useCSSModule = function (name) { | ||
var useCssModule = function (name) { | ||
var _a; | ||
@@ -1255,3 +1255,3 @@ if (name === void 0) { name = '$style'; } | ||
if (!instance) { | ||
(process.env.NODE_ENV !== 'production') && warn("useCSSModule must be called inside setup()"); | ||
(process.env.NODE_ENV !== 'production') && warn("useCssModule must be called inside setup()"); | ||
return EMPTY_OBJ; | ||
@@ -1267,2 +1267,6 @@ } | ||
}; | ||
/** | ||
* @deprecated use `useCssModule` instead. | ||
*/ | ||
var useCSSModule = useCssModule; | ||
@@ -1755,3 +1759,3 @@ function createApp(rootComponent, rootProps) { | ||
var version = "1.0.0-beta.24"; | ||
var version = "1.0.0-beta.25"; | ||
// auto install when using CDN | ||
@@ -1763,2 +1767,2 @@ if (typeof window !== 'undefined' && window.Vue) { | ||
export default Plugin; | ||
export { computed, createApp, customRef, defineComponent, del, getCurrentInstance, createElement as h, inject, isRaw, isReactive, isReadonly, isRef, markRaw, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated, provide, proxyRefs, reactive, readonly, ref, set, shallowReactive, shallowReadonly, shallowRef, toRaw, toRef, toRefs, triggerRef, unref, useCSSModule, version, warn$1 as warn, watch, watchEffect }; | ||
export { computed, createApp, customRef, defineComponent, del, getCurrentInstance, createElement as h, inject, isRaw, isReactive, isReadonly, isRef, markRaw, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated, provide, proxyRefs, reactive, readonly, ref, set, shallowReactive, shallowReadonly, shallowRef, toRaw, toRef, toRefs, triggerRef, unref, useCSSModule, useCssModule, version, warn$1 as warn, watch, watchEffect }; |
@@ -1256,3 +1256,3 @@ (function (global, factory) { | ||
; | ||
var useCSSModule = function (name) { | ||
var useCssModule = function (name) { | ||
var _a; | ||
@@ -1262,3 +1262,3 @@ if (name === void 0) { name = '$style'; } | ||
if (!instance) { | ||
warn("useCSSModule must be called inside setup()"); | ||
warn("useCssModule must be called inside setup()"); | ||
return EMPTY_OBJ; | ||
@@ -1274,2 +1274,6 @@ } | ||
}; | ||
/** | ||
* @deprecated use `useCssModule` instead. | ||
*/ | ||
var useCSSModule = useCssModule; | ||
@@ -1759,3 +1763,3 @@ function createApp(rootComponent, rootProps) { | ||
var version = "1.0.0-beta.24"; | ||
var version = "1.0.0-beta.25"; | ||
// auto install when using CDN | ||
@@ -1806,2 +1810,3 @@ if (typeof window !== 'undefined' && window.Vue) { | ||
exports.useCSSModule = useCSSModule; | ||
exports.useCssModule = useCssModule; | ||
exports.version = version; | ||
@@ -1808,0 +1813,0 @@ exports.warn = warn$1; |
@@ -1,2 +0,2 @@ | ||
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],e):e((n="undefined"!=typeof globalThis?globalThis:n||self).VueCompositionAPI={},n.Vue)}(this,(function(n,e){"use strict";function t(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var r=t(e);function o(n){return"function"==typeof n&&/native code/.test(n.toString())}var i="undefined"!=typeof Symbol&&o(Symbol)&&"undefined"!=typeof Reflect&&o(Reflect.ownKeys),u=function(n){return n},a={enumerable:!0,configurable:!0,get:u,set:u};function f(n,e,t){var r=t.get,o=t.set;a.get=r||u,a.set=o||u,Object.defineProperty(n,e,a)}function c(n,e,t,r){Object.defineProperty(n,e,{value:t,enumerable:!!r,writable:!0,configurable:!0})}function l(n,e){return Object.hasOwnProperty.call(n,e)}function s(n){return Array.isArray(n)}function v(n){var e=parseFloat(String(n));return e>=0&&Math.floor(e)===e&&isFinite(n)}function d(n){return"[object Object]"===function(n){return Object.prototype.toString.call(n)}(n)}function p(n){return"function"==typeof n}function y(n,e){r.default.util.warn(n,e)}var _=void 0;try{var b=require("vue");b&&w(b)?_=b:b&&"default"in b&&w(b.default)&&(_=b.default)}catch(n){}var g=null,h=null,m="__composition_api_installed__";function w(n){return n&&"function"==typeof n&&"Vue"===n.name}function $(){return g}function j(n){h=n}function O(){return h?S(h):null}var x,k=new WeakMap;function S(n){if(k.has(n))return k.get(n);var e={proxy:n,update:n.$forceUpdate,uid:n._uid,emit:n.$emit.bind(n),parent:null,root:null};return["data","props","attrs","refs","vnode","slots"].forEach((function(t){f(e,t,{get:function(){return n["$"+t]}})})),f(e,"isMounted",{get:function(){return n._isMounted}}),f(e,"isUnmounted",{get:function(){return n._isDestroyed}}),f(e,"isDeactivated",{get:function(){return n._inactive}}),f(e,"emitted",{get:function(){return n._events}}),k.set(n,e),n.$parent&&(e.parent=S(n.$parent)),n.$root&&(e.root=S(n.$root)),e}function R(n){var e=O();return null==e?void 0:e.proxy}function E(n,e){void 0===e&&(e={});var t=n.config.silent;n.config.silent=!0;var r=new n(e);return n.config.silent=t,r}function M(n,e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return n.$scopedSlots[e]?n.$scopedSlots[e].apply(n,t):y("slots."+e+'() got called outside of the "render()" scope',n)}}var P=function(){return(P=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}).apply(this,arguments)}; | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).VueCompositionAPI={},e.Vue)}(this,(function(e,n){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(n);function o(e){return"function"==typeof e&&/native code/.test(e.toString())}var i="undefined"!=typeof Symbol&&o(Symbol)&&"undefined"!=typeof Reflect&&o(Reflect.ownKeys),u=function(e){return e},a={enumerable:!0,configurable:!0,get:u,set:u};function f(e,n,t){var r=t.get,o=t.set;a.get=r||u,a.set=o||u,Object.defineProperty(e,n,a)}function c(e,n,t,r){Object.defineProperty(e,n,{value:t,enumerable:!!r,writable:!0,configurable:!0})}function l(e,n){return Object.hasOwnProperty.call(e,n)}function s(e){return Array.isArray(e)}function v(e){var n=parseFloat(String(e));return n>=0&&Math.floor(n)===n&&isFinite(e)}function d(e){return"[object Object]"===function(e){return Object.prototype.toString.call(e)}(e)}function p(e){return"function"==typeof e}function y(e,n){r.default.util.warn(e,n)}var _=void 0;try{var b=require("vue");b&&w(b)?_=b:b&&"default"in b&&w(b.default)&&(_=b.default)}catch(e){}var g=null,h=null,m="__composition_api_installed__";function w(e){return e&&"function"==typeof e&&"Vue"===e.name}function $(){return g}function j(e){h=e}function O(){return h?S(h):null}var x,k=new WeakMap;function S(e){if(k.has(e))return k.get(e);var n={proxy:e,update:e.$forceUpdate,uid:e._uid,emit:e.$emit.bind(e),parent:null,root:null};return["data","props","attrs","refs","vnode","slots"].forEach((function(t){f(n,t,{get:function(){return e["$"+t]}})})),f(n,"isMounted",{get:function(){return e._isMounted}}),f(n,"isUnmounted",{get:function(){return e._isDestroyed}}),f(n,"isDeactivated",{get:function(){return e._inactive}}),f(n,"emitted",{get:function(){return e._events}}),k.set(e,n),e.$parent&&(n.parent=S(e.$parent)),e.$root&&(n.root=S(e.$root)),n}function R(e){var n=O();return null==n?void 0:n.proxy}function E(e,n){void 0===n&&(n={});var t=e.config.silent;e.config.silent=!0;var r=new e(n);return e.config.silent=t,r}function M(e,n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.$scopedSlots[n]?e.$scopedSlots[n].apply(e,t):y("slots."+n+'() got called outside of the "render()" scope',e)}}var P=function(){return(P=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)}; | ||
/*! ***************************************************************************** | ||
@@ -15,2 +15,2 @@ Copyright (c) Microsoft Corporation. | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */function A(n){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&n[e],r=0;if(t)return t.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function C(n,e){var t="function"==typeof Symbol&&n[Symbol.iterator];if(!t)return n;var r,o,i=t.call(n),u=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(n){o={error:n}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return u}function D(){for(var n=[],e=0;e<arguments.length;e++)n=n.concat(C(arguments[e]));return n}function U(n){return i?Symbol.for(n):n}var V=U("composition-api.preFlushQueue"),B=U("composition-api.postFlushQueue"),W="composition-api.refKey",T=new WeakMap,z=new WeakMap,F=new WeakMap,I=function(n){f(this,"value",{get:n.get,set:n.set})};function K(n,e){var t=new I(n),r=Object.seal(t);return F.set(r,!0),r}function q(n){var e;if(Q(n))return n;var t=tn(((e={})[W]=n,e));return K({get:function(){return t[W]},set:function(n){return t[W]=n}})}function Q(n){return n instanceof I}function J(n){return Q(n)?n.value:n}function N(n){if(!d(n))return n;var e={};for(var t in n)e[t]=G(n,t);return e}function G(n,e){var t=n[e];return Q(t)?t:K({get:function(){return n[e]},set:function(t){return n[e]=t}})}function H(n){var e;return Boolean((null==n?void 0:n.__ob__)&&(null===(e=n.__ob__)||void 0===e?void 0:e.__raw__))}function L(n){var e;return Boolean((null==n?void 0:n.__ob__)&&!(null===(e=n.__ob__)||void 0===e?void 0:e.__raw__))}function X(n){if(!(!d(n)||H(n)||Array.isArray(n)||Q(n)||function(n){var e=$();return e&&n instanceof e}(n)||T.has(n))){T.set(n,!0);for(var e=Object.keys(n),t=0;t<e.length;t++)Y(n,e[t])}}function Y(n,e,t){if("__ob__"!==e&&!H(n[e])){var r,o,i=Object.getOwnPropertyDescriptor(n,e);if(i){if(!1===i.configurable)return;r=i.get,o=i.set,r&&!o||2!==arguments.length||(t=n[e])}X(t),Object.defineProperty(n,e,{enumerable:!0,configurable:!0,get:function(){var o=r?r.call(n):t;return e!==W&&Q(o)?o.value:o},set:function(i){if(!r||o){var u=r?r.call(n):t;e!==W&&Q(u)&&!Q(i)?u.value=i:o?o.call(n,i):t=i,X(i)}}})}}function Z(n){var e,t=g||_;t.observable?e=t.observable(n):e=E(t,{data:{$$state:n}})._data.$$state;return l(e,"__ob__")||c(e,"__ob__",function(n){void 0===n&&(n={});return{value:n,dep:{notify:u,depend:u,addSub:u,removeSub:u}}}(e)),e}function nn(){return Z({}).__ob__}function en(n){var e,t;if(!d(n)&&!s(n)||H(n)||!Object.isExtensible(n))return n;var r=Z({});X(r);var o=r.__ob__,i=function(e){var t,i,u=n[e],a=Object.getOwnPropertyDescriptor(n,e);if(a){if(!1===a.configurable)return"continue";t=a.get,i=a.set}Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:function(){var e,r=t?t.call(n):u;return null===(e=o.dep)||void 0===e||e.depend(),r},set:function(e){var r;t&&!i||(i?i.call(n,e):u=e,null===(r=o.dep)||void 0===r||r.notify())}})};try{for(var u=A(Object.keys(n)),a=u.next();!a.done;a=u.next()){i(a.value)}}catch(n){e={error:n}}finally{try{a&&!a.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}return r}function tn(n){if(!d(n)&&!s(n)||H(n)||!Object.isExtensible(n))return n;var e=Z(n);return X(e),e}function rn(n){return function(e){var t,r=R(((t=n)[0].toUpperCase(),t.slice(1)));r&&function(n,e,t,r){var o=e.$options,i=n.config.optionMergeStrategies[t];o[t]=i(o[t],function(n,e){return function(){for(var t,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=null===(t=O())||void 0===t?void 0:t.proxy;j(n);try{return e.apply(void 0,D(r))}finally{j(i)}}}(e,r))}($(),r,n,e)}}var on,un=rn("beforeMount"),an=rn("mounted"),fn=rn("beforeUpdate"),cn=rn("updated"),ln=rn("beforeDestroy"),sn=rn("destroyed"),vn=rn("errorCaptured"),dn=rn("activated"),pn=rn("deactivated"),yn=rn("serverPrefetch");function _n(){hn(this,V)}function bn(){hn(this,B)}function gn(){var n,e=null===(n=O())||void 0===n?void 0:n.proxy;return e?function(n){return void 0!==n[V]}(e)||function(n){n[V]=[],n[B]=[],n.$on("hook:beforeUpdate",_n),n.$on("hook:updated",bn)}(e):(on||(on=E($())),e=on),e}function hn(n,e){for(var t=n[e],r=0;r<t.length;r++)t[r]();t.length=0}function mn(n,e,t){var r=function(){n.$nextTick((function(){n[V].length&&hn(n,V),n[B].length&&hn(n,B)}))};switch(t){case"pre":r(),n[V].push(e);break;case"post":r(),n[B].push(e);break;default:!function(n,e){if(!n)throw new Error("[vue-composition-api] "+e)}(!1,'flush must be one of ["post", "pre", "sync"], but got '+t)}}function wn(n,e){var t=n.teardown;n.teardown=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];t.apply(n,r),e()}}function $n(n,e,t,r){var o,i,a=r.flush,f="sync"===a,c=function(n){i=function(){try{n()}catch(n){!function(n,e,t){if("undefined"==typeof window||"undefined"==typeof console)throw n;console.error(n)}(n)}}},l=function(){i&&(i(),i=null)},s=function(e){return f||n===on?e:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return mn(n,(function(){e.apply(void 0,D(t))}),a)}};if(null===t){var v=!1,d=function(n,e,t,r){var o=n._watchers.length;return n.$watch(e,t,{immediate:r.immediateInvokeCallback,deep:r.deep,lazy:r.noRun,sync:r.sync,before:r.before}),n._watchers[o]}(n,(function(){if(!v)try{v=!0,e(c)}finally{v=!1}}),u,{deep:r.deep||!1,sync:f,before:l});wn(d,l),d.lazy=!1;var _=d.get.bind(d);return d.get=s(_),function(){d.teardown()}}var b,g=r.deep;Array.isArray(e)?b=function(){return e.map((function(n){return Q(n)?n.value:n()}))}:Q(e)?b=function(){return e.value}:L(e)?(b=function(){return e},g=!0):p(e)?b=e:(b=u,y("Invalid watch source: "+JSON.stringify(e)+".\n A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.",n));var h=function(n,e){l(),t(n,e,c)},m=s(h);if(r.immediate){var w=m,$=function(n,e){$=w,h(n,e)};m=function(n,e){$(n,e)}}var j=n.$watch(b,m,{immediate:r.immediate,deep:g,sync:f}),O=n._watchers[n._watchers.length-1];return L(O.value)&&(null===(o=O.value.__ob__)||void 0===o?void 0:o.dep)&&g&&O.value.__ob__.dep.addSub({update:function(){O.run()}}),wn(O,l),function(){j()}}var jn={};var On={};var xn;var kn={set:function(n,e,t){(n.__composition_api_state__=n.__composition_api_state__||{})[e]=t},get:function(n,e){return(n.__composition_api_state__||{})[e]}};function Sn(n){var e=kn.get(n,"rawBindings")||{};if(e&&Object.keys(e).length){for(var t=n.$refs,r=kn.get(n,"refs")||[],o=0;o<r.length;o++){var i=e[f=r[o]];!t[f]&&i&&Q(i)&&(i.value=null)}var u=Object.keys(t),a=[];for(o=0;o<u.length;o++){var f;i=e[f=u[o]];t[f]&&i&&Q(i)&&(i.value=t[f],a.push(f))}kn.set(n,"refs",a)}}function Rn(n,e){var t=n.$options._parentVnode;if(t){for(var r=kn.get(n,"slots")||[],o=function(n,e){var t;if(n){if(n._normalized)return n._normalized;for(var r in t={},n)n[r]&&"$"!==r[0]&&(t[r]=!0)}else t={};for(var r in e)r in t||(t[r]=!0);return t}(t.data.scopedSlots,n.$slots),i=0;i<r.length;i++){o[a=r[i]]||delete e[a]}var u=Object.keys(o);for(i=0;i<u.length;i++){var a;e[a=u[i]]||(e[a]=M(n,a))}kn.set(n,"slots",u)}}function En(n,e,t){var r=h;j(n);try{return e(n)}catch(n){if(!t)throw n;t(n)}finally{j(r)}}function Mn(n){function e(n){if(d(n)&&!Q(n)&&!L(n)&&!H(n)){var t=$().util.defineReactive;Object.keys(n).forEach((function(r){var o=n[r];t(n,r,o),o&&e(o)}))}}function t(n,e){return void 0===e&&(e=new Map),e.has(n)?e.get(n):(e.set(n,!1),Array.isArray(n)&&L(n)?(e.set(n,!0),!0):!(!d(n)||H(n))&&Object.keys(n).some((function(r){return t(n[r],e)})))}n.mixin({beforeCreate:function(){var n=this,r=n.$options,o=r.setup,i=r.render;i&&(r.render=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return En(n,(function(){return i.apply(e,t)}))});if(!o)return;if("function"!=typeof o)return;var u=r.data;r.data=function(){return function(n,r){void 0===r&&(r={});var o,i=n.$options.setup,u=function(n){var e={slots:{}},t=["attrs"],r=["emit"];return["root","parent","refs","listeners","isServer","ssrContext"].forEach((function(t){var r="$"+t;f(e,t,{get:function(){return n[r]},set:function(){y("Cannot assign to '"+t+"' because it is a read-only property",n)}})})),t.forEach((function(t){var r="$"+t;f(e,t,{get:function(){var e,t,o=tn({}),i=n[r],u=function(e){f(o,e,{get:function(){return n[r][e]}})};try{for(var a=A(Object.keys(i)),c=a.next();!c.done;c=a.next()){u(c.value)}}catch(n){e={error:n}}finally{try{c&&!c.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return o},set:function(){y("Cannot assign to '"+t+"' because it is a read-only property",n)}})})),r.forEach((function(t){var r="$"+t;f(e,t,{get:function(){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n[r].apply(n,e)}}})})),e}(n);if(c(r,"__ob__",nn()),Rn(n,u.slots),En(n,(function(){o=i(r,u)})),!o)return;if(p(o)){var a=o;return void(n.$options.render=function(){return Rn(n,u.slots),En(n,(function(){return a()}))})}if(d(o)){L(o)&&(o=N(o)),kn.set(n,"rawBindings",o);var v=o;Object.keys(v).forEach((function(r){var o,i=v[r];Q(i)||(L(i)?s(i)&&(i=q(i)):p(i)?i=i.bind(n):null===(o=i)||"object"!=typeof o?i=q(i):t(i)&&e(i)),function(n,e,t){var r=n.$options.props;e in n||r&&l(r,e)||(Q(t)?f(n,e,{get:function(){return t.value},set:function(n){t.value=n}}):n[e]=t)}(n,r,i)}))}}(n,n.$props),"function"==typeof u?u.call(n,n):u||{}}},mounted:function(){Sn(this)},updated:function(){Sn(this)}})}function Pn(n,e){if(!n)return e;if(!e)return n;for(var t,r,o,u=i?Reflect.ownKeys(n):Object.keys(n),a=0;a<u.length;a++)"__ob__"!==(t=u[a])&&(r=e[t],o=n[t],l(e,t)?r!==o&&d(r)&&!Q(r)&&d(o)&&!Q(o)&&Pn(o,r):e[t]=o);return e}function An(n){(function(n){return l(n,m)})(n)||(n.config.optionMergeStrategies.setup=function(n,e){return function(t,r){return Pn("function"==typeof n?n(t,r)||{}:void 0,"function"==typeof e?e(t,r)||{}:void 0)}},function(n){g=n,Object.defineProperty(n,m,{configurable:!0,writable:!0,value:!0})}(n),Mn(n))}var Cn={install:function(n){return An(n)}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(Cn),n.computed=function(n){var e,t,r,o,i,a=null===(e=O())||void 0===e?void 0:e.proxy;if("function"==typeof n?t=n:(t=n.get,r=n.set),a&&!a.$isServer){var f,c=function(){if(!x){var n=E($(),{computed:{value:function(){return 0}}}),e=n._computedWatchers.value.constructor,t=n._data.__ob__.dep.constructor;x={Watcher:e,Dep:t},n.$destroy()}return x}(),l=c.Watcher,s=c.Dep;i=function(){return f||(f=new l(a,t,u,{lazy:!0})),f.dirty&&f.evaluate(),s.target&&f.depend(),f.value},o=function(n){r&&r(n)}}else{var v=E($(),{computed:{$$state:{get:t,set:r}}});a&&a.$on("hook:destroyed",(function(){return v.$destroy()})),i=function(){return v.$$state},o=function(n){v.$$state=n}}return K({get:i,set:o})},n.createApp=function(n,e){void 0===e&&(e=void 0);var t=$(),r=void 0;return{config:t.config,use:t.use.bind(t),mixin:t.mixin.bind(t),component:t.component.bind(t),directive:t.directive.bind(t),mount:function(o,i){return r||((r=new t(P({propsData:e},n))).$mount(o,i),r)},unmount:function(){r&&(r.$destroy(),r=void 0)}}},n.customRef=function(n){var e=q(0);return K(n((function(){e.value}),(function(){++e.value})))},n.default=Cn,n.defineComponent=function(n){return n},n.del=function(n,e){if($().util.warn,Array.isArray(n)&&v(e))n.splice(e,1);else{var t=n.__ob__;n._isVue||t&&t.vmCount||l(n,e)&&(delete n[e],t&&t.dep.notify())}},n.getCurrentInstance=O,n.h=function(){for(var n,e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=null===(n=O())||void 0===n?void 0:n.proxy;return r?r.$createElement.apply(r,e):(y("`createElement()` has been called outside of render function."),xn||(xn=E($()).$createElement),xn.apply(xn,e))},n.inject=function(n,e,t){var r;if(void 0===t&&(t=!1),!n)return e;var o=null===(r=O())||void 0===r?void 0:r.proxy;if(o){var i=function(n,e){for(var t=e;t;){if(t._provided&&l(t._provided,n))return t._provided[n];t=t.$parent}return jn}(n,o);return i!==jn?i:t&&p(e)?e():e}y("inject() can only be used inside setup() or functional components.")},n.isRaw=H,n.isReactive=L,n.isReadonly=function(n){return F.has(n)},n.isRef=Q,n.markRaw=function(n){if(!d(n)&&!s(n)||!Object.isExtensible(n))return n;var e=nn();return e.__raw__=!0,c(n,"__ob__",e),z.set(n,!0),n},n.nextTick=function(){for(var n,e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return null===(n=$())||void 0===n?void 0:n.nextTick.apply(this,e)},n.onActivated=dn,n.onBeforeMount=un,n.onBeforeUnmount=ln,n.onBeforeUpdate=fn,n.onDeactivated=pn,n.onErrorCaptured=vn,n.onMounted=an,n.onServerPrefetch=yn,n.onUnmounted=sn,n.onUpdated=cn,n.provide=function(n,e){var t=R();if(t){if(!t._provided){var r={};Object.defineProperty(t,"_provided",{get:function(){return r},set:function(n){return Object.assign(r,n)}})}t._provided[n]=e}},n.proxyRefs=function(n){var e,t,r;if(L(n))return n;var o=tn(((e={})[W]=n,e)),i=function(n){f(o,n,{get:function(){return Q(o[n])?o[n].value:o[n]},set:function(e){if(Q(o[n]))return o[n].value=J(e);o[n]=J(e)}})};try{for(var u=A(Object.keys(n)),a=u.next();!a.done;a=u.next()){i(a.value)}}catch(n){t={error:n}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return o},n.reactive=tn,n.readonly=function(n){return n},n.ref=q,n.set=function(n,e,t){var r=$().util,o=(r.warn,r.defineReactive);if(s(n)&&v(e))return n.length=Math.max(n.length,e),n.splice(e,1,t),t;if(e in n&&!(e in Object.prototype))return n[e]=t,t;var i=n.__ob__;return n._isVue||i&&i.vmCount?t:i?(o(i.value,e,t),Y(n,e,t),i.dep.notify(),t):(n[e]=t,t)},n.shallowReactive=en,n.shallowReadonly=function(n){var e,t;if(!d(n)&&!s(n)||!Object.isExtensible(n))return n;var r={},o=tn({}).__ob__,i=function(e){var t,i=n[e],u=Object.getOwnPropertyDescriptor(n,e);if(u){if(!1===u.configurable)return"continue";t=u.get}Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:function(){var e=t?t.call(n):i;return o.dep.depend(),e},set:function(n){}})};try{for(var u=A(Object.keys(n)),a=u.next();!a.done;a=u.next()){i(a.value)}}catch(n){e={error:n}}finally{try{a&&!a.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}return F.set(r,!0),r},n.shallowRef=function(n){var e;if(Q(n))return n;var t=en(((e={})[W]=n,e));return K({get:function(){return t[W]},set:function(n){return t[W]=n}})},n.toRaw=function(n){var e,t;return H(n)||!Object.isExtensible(n)?n:(null===(t=null===(e=n)||void 0===e?void 0:e.__ob__)||void 0===t?void 0:t.value)||n},n.toRef=G,n.toRefs=N,n.triggerRef=function(n){Q(n)&&(n.value=n.value)},n.unref=J,n.useCSSModule=function(n){var e;void 0===n&&(n="$style");var t=O();if(!t)return On;var r=null===(e=t.proxy)||void 0===e?void 0:e[n];return r||On},n.version="1.0.0-beta.24",n.warn=function(n){var e;y(n,null===(e=O())||void 0===e?void 0:e.proxy)},n.watch=function(n,e,t){var r=null;"function"==typeof e?r=e:(t=e,r=null);var o=function(n){return P({immediate:!1,deep:!1,flush:"pre"},n)}(t);return $n(gn(),n,r,o)},n.watchEffect=function(n,e){var t=function(n){return P({immediate:!0,deep:!1,flush:"pre"},n)}(e);return $n(gn(),n,null,t)},Object.defineProperty(n,"__esModule",{value:!0})})); | ||
***************************************************************************** */function C(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],r=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function A(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,o,i=t.call(e),u=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return u}function D(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat(A(arguments[n]));return e}function U(e){return i?Symbol.for(e):e}var V=U("composition-api.preFlushQueue"),B=U("composition-api.postFlushQueue"),W="composition-api.refKey",T=new WeakMap,z=new WeakMap,F=new WeakMap,I=function(e){f(this,"value",{get:e.get,set:e.set})};function K(e,n){var t=new I(e),r=Object.seal(t);return F.set(r,!0),r}function q(e){var n;if(Q(e))return e;var t=te(((n={})[W]=e,n));return K({get:function(){return t[W]},set:function(e){return t[W]=e}})}function Q(e){return e instanceof I}function J(e){return Q(e)?e.value:e}function N(e){if(!d(e))return e;var n={};for(var t in e)n[t]=G(e,t);return n}function G(e,n){var t=e[n];return Q(t)?t:K({get:function(){return e[n]},set:function(t){return e[n]=t}})}function H(e){var n;return Boolean((null==e?void 0:e.__ob__)&&(null===(n=e.__ob__)||void 0===n?void 0:n.__raw__))}function L(e){var n;return Boolean((null==e?void 0:e.__ob__)&&!(null===(n=e.__ob__)||void 0===n?void 0:n.__raw__))}function X(e){if(!(!d(e)||H(e)||Array.isArray(e)||Q(e)||function(e){var n=$();return n&&e instanceof n}(e)||T.has(e))){T.set(e,!0);for(var n=Object.keys(e),t=0;t<n.length;t++)Y(e,n[t])}}function Y(e,n,t){if("__ob__"!==n&&!H(e[n])){var r,o,i=Object.getOwnPropertyDescriptor(e,n);if(i){if(!1===i.configurable)return;r=i.get,o=i.set,r&&!o||2!==arguments.length||(t=e[n])}X(t),Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:function(){var o=r?r.call(e):t;return n!==W&&Q(o)?o.value:o},set:function(i){if(!r||o){var u=r?r.call(e):t;n!==W&&Q(u)&&!Q(i)?u.value=i:o?o.call(e,i):t=i,X(i)}}})}}function Z(e){var n,t=g||_;t.observable?n=t.observable(e):n=E(t,{data:{$$state:e}})._data.$$state;return l(n,"__ob__")||c(n,"__ob__",function(e){void 0===e&&(e={});return{value:e,dep:{notify:u,depend:u,addSub:u,removeSub:u}}}(n)),n}function ee(){return Z({}).__ob__}function ne(e){var n,t;if(!d(e)&&!s(e)||H(e)||!Object.isExtensible(e))return e;var r=Z({});X(r);var o=r.__ob__,i=function(n){var t,i,u=e[n],a=Object.getOwnPropertyDescriptor(e,n);if(a){if(!1===a.configurable)return"continue";t=a.get,i=a.set}Object.defineProperty(r,n,{enumerable:!0,configurable:!0,get:function(){var n,r=t?t.call(e):u;return null===(n=o.dep)||void 0===n||n.depend(),r},set:function(n){var r;t&&!i||(i?i.call(e,n):u=n,null===(r=o.dep)||void 0===r||r.notify())}})};try{for(var u=C(Object.keys(e)),a=u.next();!a.done;a=u.next()){i(a.value)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(t=u.return)&&t.call(u)}finally{if(n)throw n.error}}return r}function te(e){if(!d(e)&&!s(e)||H(e)||!Object.isExtensible(e))return e;var n=Z(e);return X(n),n}function re(e){return function(n){var t,r=R(((t=e)[0].toUpperCase(),t.slice(1)));r&&function(e,n,t,r){var o=n.$options,i=e.config.optionMergeStrategies[t];o[t]=i(o[t],function(e,n){return function(){for(var t,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=null===(t=O())||void 0===t?void 0:t.proxy;j(e);try{return n.apply(void 0,D(r))}finally{j(i)}}}(n,r))}($(),r,e,n)}}var oe,ie=re("beforeMount"),ue=re("mounted"),ae=re("beforeUpdate"),fe=re("updated"),ce=re("beforeDestroy"),le=re("destroyed"),se=re("errorCaptured"),ve=re("activated"),de=re("deactivated"),pe=re("serverPrefetch");function ye(){ge(this,V)}function _e(){ge(this,B)}function be(){var e,n=null===(e=O())||void 0===e?void 0:e.proxy;return n?function(e){return void 0!==e[V]}(n)||function(e){e[V]=[],e[B]=[],e.$on("hook:beforeUpdate",ye),e.$on("hook:updated",_e)}(n):(oe||(oe=E($())),n=oe),n}function ge(e,n){for(var t=e[n],r=0;r<t.length;r++)t[r]();t.length=0}function he(e,n,t){var r=function(){e.$nextTick((function(){e[V].length&&ge(e,V),e[B].length&&ge(e,B)}))};switch(t){case"pre":r(),e[V].push(n);break;case"post":r(),e[B].push(n);break;default:!function(e,n){if(!e)throw new Error("[vue-composition-api] "+n)}(!1,'flush must be one of ["post", "pre", "sync"], but got '+t)}}function me(e,n){var t=e.teardown;e.teardown=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];t.apply(e,r),n()}}function we(e,n,t,r){var o,i,a=r.flush,f="sync"===a,c=function(e){i=function(){try{e()}catch(e){!function(e,n,t){if("undefined"==typeof window||"undefined"==typeof console)throw e;console.error(e)}(e)}}},l=function(){i&&(i(),i=null)},s=function(n){return f||e===oe?n:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return he(e,(function(){n.apply(void 0,D(t))}),a)}};if(null===t){var v=!1,d=function(e,n,t,r){var o=e._watchers.length;return e.$watch(n,t,{immediate:r.immediateInvokeCallback,deep:r.deep,lazy:r.noRun,sync:r.sync,before:r.before}),e._watchers[o]}(e,(function(){if(!v)try{v=!0,n(c)}finally{v=!1}}),u,{deep:r.deep||!1,sync:f,before:l});me(d,l),d.lazy=!1;var _=d.get.bind(d);return d.get=s(_),function(){d.teardown()}}var b,g=r.deep;Array.isArray(n)?b=function(){return n.map((function(e){return Q(e)?e.value:e()}))}:Q(n)?b=function(){return n.value}:L(n)?(b=function(){return n},g=!0):p(n)?b=n:(b=u,y("Invalid watch source: "+JSON.stringify(n)+".\n A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.",e));var h=function(e,n){l(),t(e,n,c)},m=s(h);if(r.immediate){var w=m,$=function(e,n){$=w,h(e,n)};m=function(e,n){$(e,n)}}var j=e.$watch(b,m,{immediate:r.immediate,deep:g,sync:f}),O=e._watchers[e._watchers.length-1];return L(O.value)&&(null===(o=O.value.__ob__)||void 0===o?void 0:o.dep)&&g&&O.value.__ob__.dep.addSub({update:function(){O.run()}}),me(O,l),function(){j()}}var $e={};var je={},Oe=function(e){var n;void 0===e&&(e="$style");var t=O();if(!t)return je;var r=null===(n=t.proxy)||void 0===n?void 0:n[e];return r||je},xe=Oe;var ke;var Se={set:function(e,n,t){(e.__composition_api_state__=e.__composition_api_state__||{})[n]=t},get:function(e,n){return(e.__composition_api_state__||{})[n]}};function Re(e){var n=Se.get(e,"rawBindings")||{};if(n&&Object.keys(n).length){for(var t=e.$refs,r=Se.get(e,"refs")||[],o=0;o<r.length;o++){var i=n[f=r[o]];!t[f]&&i&&Q(i)&&(i.value=null)}var u=Object.keys(t),a=[];for(o=0;o<u.length;o++){var f;i=n[f=u[o]];t[f]&&i&&Q(i)&&(i.value=t[f],a.push(f))}Se.set(e,"refs",a)}}function Ee(e,n){var t=e.$options._parentVnode;if(t){for(var r=Se.get(e,"slots")||[],o=function(e,n){var t;if(e){if(e._normalized)return e._normalized;for(var r in t={},e)e[r]&&"$"!==r[0]&&(t[r]=!0)}else t={};for(var r in n)r in t||(t[r]=!0);return t}(t.data.scopedSlots,e.$slots),i=0;i<r.length;i++){o[a=r[i]]||delete n[a]}var u=Object.keys(o);for(i=0;i<u.length;i++){var a;n[a=u[i]]||(n[a]=M(e,a))}Se.set(e,"slots",u)}}function Me(e,n,t){var r=h;j(e);try{return n(e)}catch(e){if(!t)throw e;t(e)}finally{j(r)}}function Pe(e){function n(e){if(d(e)&&!Q(e)&&!L(e)&&!H(e)){var t=$().util.defineReactive;Object.keys(e).forEach((function(r){var o=e[r];t(e,r,o),o&&n(o)}))}}function t(e,n){return void 0===n&&(n=new Map),n.has(e)?n.get(e):(n.set(e,!1),Array.isArray(e)&&L(e)?(n.set(e,!0),!0):!(!d(e)||H(e))&&Object.keys(e).some((function(r){return t(e[r],n)})))}e.mixin({beforeCreate:function(){var e=this,r=e.$options,o=r.setup,i=r.render;i&&(r.render=function(){for(var n=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Me(e,(function(){return i.apply(n,t)}))});if(!o)return;if("function"!=typeof o)return;var u=r.data;r.data=function(){return function(e,r){void 0===r&&(r={});var o,i=e.$options.setup,u=function(e){var n={slots:{}},t=["attrs"],r=["emit"];return["root","parent","refs","listeners","isServer","ssrContext"].forEach((function(t){var r="$"+t;f(n,t,{get:function(){return e[r]},set:function(){y("Cannot assign to '"+t+"' because it is a read-only property",e)}})})),t.forEach((function(t){var r="$"+t;f(n,t,{get:function(){var n,t,o=te({}),i=e[r],u=function(n){f(o,n,{get:function(){return e[r][n]}})};try{for(var a=C(Object.keys(i)),c=a.next();!c.done;c=a.next()){u(c.value)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(t=a.return)&&t.call(a)}finally{if(n)throw n.error}}return o},set:function(){y("Cannot assign to '"+t+"' because it is a read-only property",e)}})})),r.forEach((function(t){var r="$"+t;f(n,t,{get:function(){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];e[r].apply(e,n)}}})})),n}(e);if(c(r,"__ob__",ee()),Ee(e,u.slots),Me(e,(function(){o=i(r,u)})),!o)return;if(p(o)){var a=o;return void(e.$options.render=function(){return Ee(e,u.slots),Me(e,(function(){return a()}))})}if(d(o)){L(o)&&(o=N(o)),Se.set(e,"rawBindings",o);var v=o;Object.keys(v).forEach((function(r){var o,i=v[r];Q(i)||(L(i)?s(i)&&(i=q(i)):p(i)?i=i.bind(e):null===(o=i)||"object"!=typeof o?i=q(i):t(i)&&n(i)),function(e,n,t){var r=e.$options.props;n in e||r&&l(r,n)||(Q(t)?f(e,n,{get:function(){return t.value},set:function(e){t.value=e}}):e[n]=t)}(e,r,i)}))}}(e,e.$props),"function"==typeof u?u.call(e,e):u||{}}},mounted:function(){Re(this)},updated:function(){Re(this)}})}function Ce(e,n){if(!e)return n;if(!n)return e;for(var t,r,o,u=i?Reflect.ownKeys(e):Object.keys(e),a=0;a<u.length;a++)"__ob__"!==(t=u[a])&&(r=n[t],o=e[t],l(n,t)?r!==o&&d(r)&&!Q(r)&&d(o)&&!Q(o)&&Ce(o,r):n[t]=o);return n}function Ae(e){(function(e){return l(e,m)})(e)||(e.config.optionMergeStrategies.setup=function(e,n){return function(t,r){return Ce("function"==typeof e?e(t,r)||{}:void 0,"function"==typeof n?n(t,r)||{}:void 0)}},function(e){g=e,Object.defineProperty(e,m,{configurable:!0,writable:!0,value:!0})}(e),Pe(e))}var De={install:function(e){return Ae(e)}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(De),e.computed=function(e){var n,t,r,o,i,a=null===(n=O())||void 0===n?void 0:n.proxy;if("function"==typeof e?t=e:(t=e.get,r=e.set),a&&!a.$isServer){var f,c=function(){if(!x){var e=E($(),{computed:{value:function(){return 0}}}),n=e._computedWatchers.value.constructor,t=e._data.__ob__.dep.constructor;x={Watcher:n,Dep:t},e.$destroy()}return x}(),l=c.Watcher,s=c.Dep;i=function(){return f||(f=new l(a,t,u,{lazy:!0})),f.dirty&&f.evaluate(),s.target&&f.depend(),f.value},o=function(e){r&&r(e)}}else{var v=E($(),{computed:{$$state:{get:t,set:r}}});a&&a.$on("hook:destroyed",(function(){return v.$destroy()})),i=function(){return v.$$state},o=function(e){v.$$state=e}}return K({get:i,set:o})},e.createApp=function(e,n){void 0===n&&(n=void 0);var t=$(),r=void 0;return{config:t.config,use:t.use.bind(t),mixin:t.mixin.bind(t),component:t.component.bind(t),directive:t.directive.bind(t),mount:function(o,i){return r||((r=new t(P({propsData:n},e))).$mount(o,i),r)},unmount:function(){r&&(r.$destroy(),r=void 0)}}},e.customRef=function(e){var n=q(0);return K(e((function(){n.value}),(function(){++n.value})))},e.default=De,e.defineComponent=function(e){return e},e.del=function(e,n){if($().util.warn,Array.isArray(e)&&v(n))e.splice(n,1);else{var t=e.__ob__;e._isVue||t&&t.vmCount||l(e,n)&&(delete e[n],t&&t.dep.notify())}},e.getCurrentInstance=O,e.h=function(){for(var e,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var r=null===(e=O())||void 0===e?void 0:e.proxy;return r?r.$createElement.apply(r,n):(y("`createElement()` has been called outside of render function."),ke||(ke=E($()).$createElement),ke.apply(ke,n))},e.inject=function(e,n,t){var r;if(void 0===t&&(t=!1),!e)return n;var o=null===(r=O())||void 0===r?void 0:r.proxy;if(o){var i=function(e,n){for(var t=n;t;){if(t._provided&&l(t._provided,e))return t._provided[e];t=t.$parent}return $e}(e,o);return i!==$e?i:t&&p(n)?n():n}y("inject() can only be used inside setup() or functional components.")},e.isRaw=H,e.isReactive=L,e.isReadonly=function(e){return F.has(e)},e.isRef=Q,e.markRaw=function(e){if(!d(e)&&!s(e)||!Object.isExtensible(e))return e;var n=ee();return n.__raw__=!0,c(e,"__ob__",n),z.set(e,!0),e},e.nextTick=function(){for(var e,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return null===(e=$())||void 0===e?void 0:e.nextTick.apply(this,n)},e.onActivated=ve,e.onBeforeMount=ie,e.onBeforeUnmount=ce,e.onBeforeUpdate=ae,e.onDeactivated=de,e.onErrorCaptured=se,e.onMounted=ue,e.onServerPrefetch=pe,e.onUnmounted=le,e.onUpdated=fe,e.provide=function(e,n){var t=R();if(t){if(!t._provided){var r={};Object.defineProperty(t,"_provided",{get:function(){return r},set:function(e){return Object.assign(r,e)}})}t._provided[e]=n}},e.proxyRefs=function(e){var n,t,r;if(L(e))return e;var o=te(((n={})[W]=e,n)),i=function(e){f(o,e,{get:function(){return Q(o[e])?o[e].value:o[e]},set:function(n){if(Q(o[e]))return o[e].value=J(n);o[e]=J(n)}})};try{for(var u=C(Object.keys(e)),a=u.next();!a.done;a=u.next()){i(a.value)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return o},e.reactive=te,e.readonly=function(e){return e},e.ref=q,e.set=function(e,n,t){var r=$().util,o=(r.warn,r.defineReactive);if(s(e)&&v(n))return e.length=Math.max(e.length,n),e.splice(n,1,t),t;if(n in e&&!(n in Object.prototype))return e[n]=t,t;var i=e.__ob__;return e._isVue||i&&i.vmCount?t:i?(o(i.value,n,t),Y(e,n,t),i.dep.notify(),t):(e[n]=t,t)},e.shallowReactive=ne,e.shallowReadonly=function(e){var n,t;if(!d(e)&&!s(e)||!Object.isExtensible(e))return e;var r={},o=te({}).__ob__,i=function(n){var t,i=e[n],u=Object.getOwnPropertyDescriptor(e,n);if(u){if(!1===u.configurable)return"continue";t=u.get}Object.defineProperty(r,n,{enumerable:!0,configurable:!0,get:function(){var n=t?t.call(e):i;return o.dep.depend(),n},set:function(e){}})};try{for(var u=C(Object.keys(e)),a=u.next();!a.done;a=u.next()){i(a.value)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(t=u.return)&&t.call(u)}finally{if(n)throw n.error}}return F.set(r,!0),r},e.shallowRef=function(e){var n;if(Q(e))return e;var t=ne(((n={})[W]=e,n));return K({get:function(){return t[W]},set:function(e){return t[W]=e}})},e.toRaw=function(e){var n,t;return H(e)||!Object.isExtensible(e)?e:(null===(t=null===(n=e)||void 0===n?void 0:n.__ob__)||void 0===t?void 0:t.value)||e},e.toRef=G,e.toRefs=N,e.triggerRef=function(e){Q(e)&&(e.value=e.value)},e.unref=J,e.useCSSModule=xe,e.useCssModule=Oe,e.version="1.0.0-beta.25",e.warn=function(e){var n;y(e,null===(n=O())||void 0===n?void 0:n.proxy)},e.watch=function(e,n,t){var r=null;"function"==typeof n?r=n:(t=n,r=null);var o=function(e){return P({immediate:!1,deep:!1,flush:"pre"},e)}(t);return we(be(),e,r,o)},e.watchEffect=function(e,n){var t=function(e){return P({immediate:!0,deep:!1,flush:"pre"},e)}(n);return we(be(),e,null,t)},Object.defineProperty(e,"__esModule",{value:!0})})); |
{ | ||
"name": "@vue/composition-api", | ||
"version": "1.0.0-beta.24", | ||
"version": "1.0.0-beta.25", | ||
"description": "Provide logic composition capabilities for Vue.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -44,3 +44,3 @@ # @vue/composition-api | ||
<script src="https://cdn.jsdelivr.net/npm/vue@2.6"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@vue/composition-api@1.0.0-beta.24"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@vue/composition-api@1.0.0-beta.25"></script> | ||
``` | ||
@@ -47,0 +47,0 @@ <!--cdn-links-end--> |
@@ -43,3 +43,3 @@ # @vue/composition-api | ||
<script src="https://cdn.jsdelivr.net/npm/vue@2.6"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@vue/composition-api@1.0.0-beta.24"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@vue/composition-api@1.0.0-beta.25"></script> | ||
``` | ||
@@ -46,0 +46,0 @@ <!--cdn-links-end--> |
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
286542
5851