@vueuse/rxjs
Advanced tools
Comparing version 10.7.2 to 10.8.0
@@ -22,3 +22,5 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) { | ||
VueDemi.warn = Vue.util.warn | ||
VueDemi.hasInjectionContext = () => !!VueDemi.getCurrentInstance() | ||
VueDemi.hasInjectionContext = function() { | ||
return !!VueDemi.getCurrentInstance() | ||
} | ||
function createApp(rootComponent, rootProps) { | ||
@@ -76,3 +78,5 @@ var vm | ||
VueDemi.version = Vue.version | ||
VueDemi.hasInjectionContext = () => !!VueDemi.getCurrentInstance() | ||
VueDemi.hasInjectionContext = function() { | ||
return !!VueDemi.getCurrentInstance() | ||
} | ||
} else { | ||
@@ -79,0 +83,0 @@ console.error('[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.') |
@@ -1,1 +0,1 @@ | ||
var VueDemi=function(n,r,l){if(n.install)return n;if(!r)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),n;if(r.version.slice(0,4)==="2.7."){let u=function(f,d){var b,y={},O={config:r.config,use:r.use.bind(r),mixin:r.mixin.bind(r),component:r.component.bind(r),provide:function(v,e){return y[v]=e,this},directive:function(v,e){return e?(r.directive(v,e),O):r.directive(v)},mount:function(v,e){return b||(b=new r(Object.assign({propsData:d},f,{provide:Object.assign(y,f.provide)})),b.$mount(v,e),b)},unmount:function(){b&&(b.$destroy(),b=void 0)}};return O};var S=u;for(var c in r)n[c]=r[c];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=r,n.Vue2=r,n.version=r.version,n.warn=r.util.warn,n.hasInjectionContext=()=>!!n.getCurrentInstance(),n.createApp=u}else if(r.version.slice(0,2)==="2.")if(l){for(var c in l)n[c]=l[c];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=r,n.Vue2=r,n.version=r.version,n.hasInjectionContext=()=>!!n.getCurrentInstance()}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(r.version.slice(0,2)==="3."){for(var c in r)n[c]=r[c];n.isVue2=!1,n.isVue3=!0,n.install=function(){},n.Vue=r,n.Vue2=void 0,n.version=r.version,n.set=function(u,f,d){return Array.isArray(u)?(u.length=Math.max(u.length,f),u.splice(f,1,d),d):(u[f]=d,d)},n.del=function(u,f){if(Array.isArray(u)){u.splice(f,1);return}delete u[f]}}else console.error("[vue-demi] Vue version "+r.version+" is unsupported.");return n}(this.VueDemi=this.VueDemi||(typeof VueDemi<"u"?VueDemi:{}),this.Vue||(typeof Vue<"u"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(n,r,l,c){"use strict";function S(e,o){return l.isRef(e)?new r.Observable(i=>l.watch(e,s=>i.next(s),o)):r.from(e)}function u(e,o){return l.isRef(e)?new r.Observable(i=>{let s;return l.watch(e,t=>{s?.unsubscribe(),t instanceof HTMLElement&&(s=r.fromEvent(t,o).subscribe(i),i.add(s))},{immediate:!0})}):r.fromEvent(e,o)}function f(e){return{next:o=>{e.value=o}}}function d(e,o,i,s){let t;c.tryOnScopeDispose(()=>{t?.unsubscribe(),t=void 0});const a=l.shallowRef(i?.initialValue);return l.watch(e,(p,w,E)=>{t?.unsubscribe(),typeof p<"u"&&p!==null?t=o(p,w,E).subscribe({error:h=>{var A;(A=i?.onError)==null||A.call(i,h)},complete:()=>{var h;(h=i?.onComplete)==null||h.call(i)},next:h=>{a.value=h}}):t=void 0},{immediate:!0,...s}),l.readonly(a)}function b(e,o){const i=l.ref(o?.initialValue),s=e.subscribe({next:t=>i.value=t,error:o?.onError});return c.tryOnScopeDispose(()=>{s.unsubscribe()}),i}function y(e,o){const i=l.ref(e instanceof r.BehaviorSubject?e.value:void 0),s=e.subscribe({next(t){i.value=t},error:o?.onError});return l.watch(i,t=>{e.next(t)}),c.tryOnScopeDispose(()=>{s.unsubscribe()}),i}function O(e){c.tryOnScopeDispose(()=>{e.unsubscribe()})}function v(e,o,i,s,t){let a;return c.tryOnScopeDispose(()=>{a?.unsubscribe(),a=void 0}),l.watch(e,(p,w,E)=>{a?.unsubscribe(),typeof p<"u"&&p!==null?a=o(p,w,E).subscribe({next:i,error:s?.onError,complete:s?.onComplete}):a=void 0},t)}n.from=S,n.fromEvent=u,n.toObserver=f,n.useExtractedObservable=d,n.useObservable=b,n.useSubject=y,n.useSubscription=O,n.watchExtractedObservable=v})(this.VueUse=this.VueUse||{},rxjs,VueDemi,VueUse); | ||
var VueDemi=function(n,r,l){if(n.install)return n;if(!r)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),n;if(r.version.slice(0,4)==="2.7."){let u=function(f,d){var b,y={},O={config:r.config,use:r.use.bind(r),mixin:r.mixin.bind(r),component:r.component.bind(r),provide:function(v,e){return y[v]=e,this},directive:function(v,e){return e?(r.directive(v,e),O):r.directive(v)},mount:function(v,e){return b||(b=new r(Object.assign({propsData:d},f,{provide:Object.assign(y,f.provide)})),b.$mount(v,e),b)},unmount:function(){b&&(b.$destroy(),b=void 0)}};return O};var S=u;for(var c in r)n[c]=r[c];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=r,n.Vue2=r,n.version=r.version,n.warn=r.util.warn,n.hasInjectionContext=function(){return!!n.getCurrentInstance()},n.createApp=u}else if(r.version.slice(0,2)==="2.")if(l){for(var c in l)n[c]=l[c];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=r,n.Vue2=r,n.version=r.version,n.hasInjectionContext=function(){return!!n.getCurrentInstance()}}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(r.version.slice(0,2)==="3."){for(var c in r)n[c]=r[c];n.isVue2=!1,n.isVue3=!0,n.install=function(){},n.Vue=r,n.Vue2=void 0,n.version=r.version,n.set=function(u,f,d){return Array.isArray(u)?(u.length=Math.max(u.length,f),u.splice(f,1,d),d):(u[f]=d,d)},n.del=function(u,f){if(Array.isArray(u)){u.splice(f,1);return}delete u[f]}}else console.error("[vue-demi] Vue version "+r.version+" is unsupported.");return n}(this.VueDemi=this.VueDemi||(typeof VueDemi<"u"?VueDemi:{}),this.Vue||(typeof Vue<"u"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(n,r,l,c){"use strict";function S(e,o){return l.isRef(e)?new r.Observable(i=>l.watch(e,s=>i.next(s),o)):r.from(e)}function u(e,o){return l.isRef(e)?new r.Observable(i=>{let s;return l.watch(e,t=>{s?.unsubscribe(),t instanceof HTMLElement&&(s=r.fromEvent(t,o).subscribe(i),i.add(s))},{immediate:!0})}):r.fromEvent(e,o)}function f(e){return{next:o=>{e.value=o}}}function d(e,o,i,s){let t;c.tryOnScopeDispose(()=>{t?.unsubscribe(),t=void 0});const a=l.shallowRef(i?.initialValue);return l.watch(e,(p,w,E)=>{t?.unsubscribe(),typeof p<"u"&&p!==null?t=o(p,w,E).subscribe({error:h=>{var A;(A=i?.onError)==null||A.call(i,h)},complete:()=>{var h;(h=i?.onComplete)==null||h.call(i)},next:h=>{a.value=h}}):t=void 0},{immediate:!0,...s}),l.readonly(a)}function b(e,o){const i=l.ref(o?.initialValue),s=e.subscribe({next:t=>i.value=t,error:o?.onError});return c.tryOnScopeDispose(()=>{s.unsubscribe()}),i}function y(e,o){const i=l.ref(e instanceof r.BehaviorSubject?e.value:void 0),s=e.subscribe({next(t){i.value=t},error:o?.onError});return l.watch(i,t=>{e.next(t)}),c.tryOnScopeDispose(()=>{s.unsubscribe()}),i}function O(e){c.tryOnScopeDispose(()=>{e.unsubscribe()})}function v(e,o,i,s,t){let a;return c.tryOnScopeDispose(()=>{a?.unsubscribe(),a=void 0}),l.watch(e,(p,w,E)=>{a?.unsubscribe(),typeof p<"u"&&p!==null?a=o(p,w,E).subscribe({next:i,error:s?.onError,complete:s?.onComplete}):a=void 0},t)}n.from=S,n.fromEvent=u,n.toObserver=f,n.useExtractedObservable=d,n.useObservable=b,n.useSubject=y,n.useSubscription=O,n.watchExtractedObservable=v})(this.VueUse=this.VueUse||{},rxjs,VueDemi,VueUse); |
{ | ||
"name": "@vueuse/rxjs", | ||
"version": "10.7.2", | ||
"version": "10.8.0", | ||
"description": "Enables RxJS reactive functions in Vue", | ||
@@ -41,4 +41,4 @@ "author": "Anthony Fu <https://github.com/antfu>", | ||
"dependencies": { | ||
"@vueuse/shared": "10.7.2", | ||
"vue-demi": ">=0.14.6" | ||
"@vueuse/shared": "10.8.0", | ||
"vue-demi": ">=0.14.7" | ||
}, | ||
@@ -45,0 +45,0 @@ "devDependencies": { |
@@ -18,3 +18,3 @@ # @vueuse/rxjs | ||
- [`from`](https://vueuse.org/rxjs/from/) — / fromEvent | ||
- [`from`](https://vueuse.org/rxjs/from/) — wrappers around RxJS's [`from()`](https://rxjs.dev/api/index/function/from) and [`fromEvent()`](https://rxjs.dev/api/index/function/fromEvent) to allow them to accept `ref`s | ||
- [`toObserver`](https://vueuse.org/rxjs/toObserver/) — sugar function to convert a `ref` into an RxJS [Observer](https://rxjs.dev/guide/observer) | ||
@@ -21,0 +21,0 @@ - [`useExtractedObservable`](https://vueuse.org/rxjs/useExtractedObservable/) — use an RxJS [`Observable`](https://rxjs.dev/guide/observable) as extracted from one or more composables |
38489
547
+ Added@vueuse/shared@10.8.0(transitive)
- Removed@vueuse/shared@10.7.2(transitive)
Updated@vueuse/shared@10.8.0
Updatedvue-demi@>=0.14.7