Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

effector-vue

Package Overview
Dependencies
Maintainers
4
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

effector-vue - npm Package Compare versions

Comparing version 21.0.3 to 21.1.0

composition.cjs.d.ts

2

compat.js

@@ -1,2 +0,2 @@

'use strict';function t(t,e){var r=this;void 0===e&&(e={immediate:1});var o=n.createEvent(),i=n.restore(o,{}),a=function(){r.$watch(t,(function(t,e){o({oldValue:e,newValue:t})}),e)};return this._data?a():this.$once('hook:created',a),i}function e(t){return this.$watchAsStore(t).map((function(t){return t.newValue}))}Object.defineProperty(exports,'__esModule',{value:1});var r,o=(r=require('vue'))&&'object'==typeof r&&'default'in r?r.default:r,n=require('effector/compat'),i={beforeCreate:function(){var t=this,e=this.$options.effector;if("function"==typeof e&&(e=e.call(this)),e){this.$options.computed||(this.$options.computed={}),this.__clear=n.createEvent(),this.__forwards=[];var r={};for(var i in n.withRegion(this.__clear,(function(){if(n.is.store(e)){var i,a='state',f=o.observable(((i={})[a]=e.getState(),i)),s=n.createEvent(),c=n.forward({from:s,to:e});t.__forwards.push(c),e.watch((function(t){f[a]=t})),r[a]={get:function(){return f[a]},set:s}}else{if('object'!=typeof e||null===e)throw Error('property should be Store');(function(){var i={},a=0;for(var f in e){var s=e[f];if(n.is.store(s))i[f]=s;else{if(!n.is.unit(s))throw Error('property should be Store or Unit (will be transform to Store<number>)');i[f]=n.restore(s.map((function(){return++a})),null)}}var c=n.combine(i),u=o.observable(c.defaultState);c.watch((function(t){for(var e in t)u[e]=t[e]}));var h=function(e){var o=n.createEvent(),a=n.forward({from:o,to:i[e]});t.__forwards.push(a),r[e]={get:function(){return u[e]},set:o}};for(var l in u)h(l)})()}})),r)this.$options.computed[i]=r[i]}},beforeDestroy:function(){this.__clear&&(n.clearNode(this.__clear),this.__forwards.forEach((function(t){t()})))}};exports.VueEffector=function(r){r.mixin(i),r.prototype.$watchAsStore=t,r.prototype.$store=e},exports.createComponent=function(t,e){return o.extend(Object.assign({},t,e&&{effector:function(){return e}}))};
'use strict';function t(t){return t&&'object'==typeof t&&'default'in t?t.default:t}function e(t,e){var r=this;void 0===e&&(e={immediate:1});var o=n.createEvent(),i=n.restore(o,{}),a=function(){r.$watch(t,(function(t,e){o({oldValue:e,newValue:t})}),e)};return this._data?a():this.$once('hook:created',a),i}function r(t){return this.$watchAsStore(t).map((function(t){return t.newValue}))}Object.defineProperty(exports,'__esModule',{value:1});var o=require('vue'),n=require('effector/compat'),i=t(o),a={beforeCreate:function(){var t=this,e=this.$options.effector;if("function"==typeof e&&(e=e.call(this)),e){this.$options.computed||(this.$options.computed={});var r={};if(n.is.store(e))r={state:e};else{if('object'!=typeof e)throw Error('property should be Store');r=Object.assign({},e)}this.__clear=n.createEvent(),n.withRegion(this.__clear,(function(){var e={},o=0;for(var a in r){var c=r[a];if(n.is.store(c))e[a]=c;else{if(!n.is.event(c)&&!n.is.effect(c))throw Error("Effector property "+a+" should be Store or Unit (will be transform to Store<number>)");e[a]=n.restore(c.map((function(){return++o})),null)}}var s=n.combine(e),f=i.observable({state:s.defaultState});s.watch((function(t){return f.state=t}));var u=function(r){var o=n.createEvent();n.forward({from:o,to:e[r]}),t.$options.computed[r]={get:function(){return f.state[r]},set:o}};for(var p in e)u(p)}))}},beforeDestroy:function(){this.__clear&&n.clearNode(this.__clear)}};exports.VueEffector=function(t){t.mixin(a),t.prototype.$watchAsStore=e,t.prototype.$store=r},exports.createComponent=function(t,e){return i.extend(Object.assign({},t,e&&{effector:function(){return e}}))};
//# sourceMappingURL=compat.js.map

@@ -1,2 +0,2 @@

function e(e,t={immediate:1}){let r=effector.createEvent(),o=effector.restore(r,{}),s=()=>{this.$watch(e,(e,t)=>{r({oldValue:t,newValue:e})},t)};return this._data?s():this.$once('hook:created',s),o}function t(e){return this.$watchAsStore(e).map(({newValue:e})=>e)}Object.defineProperty(exports,'__esModule',{value:1});var r,o=(r=require('vue'))&&'object'==typeof r&&'default'in r?r.default:r,effector=require('effector');const s={beforeCreate(){let e=this.$options.effector;if("function"==typeof e&&(e=e.call(this)),!e)return;this.$options.computed||(this.$options.computed={}),this.__clear=effector.createEvent(),this.__forwards=[];let t={};effector.withRegion(this.__clear,()=>{if(effector.is.store(e)){let r='state',s=o.observable({[r]:e.getState()}),i=effector.createEvent(),a=effector.forward({from:i,to:e});this.__forwards.push(a),e.watch(e=>{s[r]=e}),t[r]={get:()=>s[r],set:i}}else{if('object'!=typeof e||null===e)throw Error('property should be Store');{let r={},s=0;for(let t in e){let o=e[t];if(effector.is.store(o))r[t]=o;else{if(!effector.is.unit(o))throw Error('property should be Store or Unit (will be transform to Store<number>)');r[t]=effector.restore(o.map(()=>++s),null)}}let i=effector.combine(r),a=o.observable(i.defaultState);i.watch(e=>{for(let t in e)a[t]=e[t]});for(let e in a){let o=effector.createEvent(),s=effector.forward({from:o,to:r[e]});this.__forwards.push(s),t[e]={get:()=>a[e],set:o}}}}});for(let e in t)this.$options.computed[e]=t[e]},beforeDestroy(){this.__clear&&(effector.clearNode(this.__clear),this.__forwards.forEach(e=>{e()}))}};exports.VueEffector=r=>{r.mixin(s),r.prototype.$watchAsStore=e,r.prototype.$store=t},exports.createComponent=(e,t)=>o.extend(Object.assign({},e,t&&{effector:()=>t}));
function e(e){return e&&'object'==typeof e&&'default'in e?e.default:e}function t(e,t={immediate:1}){let o=effector.createEvent(),r=effector.restore(o,{}),s=()=>{this.$watch(e,((e,t)=>{o({oldValue:t,newValue:e})}),t)};return this._data?s():this.$once('hook:created',s),r}function o(e){return this.$watchAsStore(e).map((({newValue:e})=>e))}Object.defineProperty(exports,'__esModule',{value:1});var r=require('vue'),effector=require('effector'),s=e(r);const i={beforeCreate(){let e=this.$options.effector;if("function"==typeof e&&(e=e.call(this)),!e)return;this.$options.computed||(this.$options.computed={});let t={};if(effector.is.store(e))t={state:e};else{if('object'!=typeof e)throw Error('property should be Store');t={...e}}this.__clear=effector.createEvent(),effector.withRegion(this.__clear,(()=>{let e={},o=0;for(let r in t){let s=t[r];if(effector.is.store(s))e[r]=s;else{if(!effector.is.event(s)&&!effector.is.effect(s))throw Error(`Effector property ${r} should be Store or Unit (will be transform to Store<number>)`);e[r]=effector.restore(s.map((()=>++o)),null)}}let r=effector.combine(e),i=s.observable({state:r.defaultState});r.watch((e=>i.state=e));for(let t in e){let o=effector.createEvent();effector.forward({from:o,to:e[t]}),this.$options.computed[t]={get:()=>i.state[t],set:o}}}))},beforeDestroy(){this.__clear&&effector.clearNode(this.__clear)}};exports.VueEffector=e=>{e.mixin(i),e.prototype.$watchAsStore=t,e.prototype.$store=o},exports.createComponent=(e,t)=>s.extend(Object.assign({},e,t&&{effector:()=>t}));
//# sourceMappingURL=effector-vue.cjs.js.map

@@ -1,2 +0,2 @@

((e,t)=>{'object'==typeof exports&&'undefined'!=typeof module?t(exports,require('vue'),require('effector')):'function'==typeof define&&define.amd?define(['exports','vue','effector'],t):t((e=e||self).effectorVue={},e.Vue,e.effector)})(this,(function(e,t,effector){function o(e,t={immediate:1}){let o=effector.createEvent(),r=effector.restore(o,{}),s=()=>{this.$watch(e,(e,t)=>{o({oldValue:t,newValue:e})},t)};return this._data?s():this.$once('hook:created',s),r}function r(e){return this.$watchAsStore(e).map(({newValue:e})=>e)}t=t&&{}.hasOwnProperty.call(t,'default')?t.default:t;const s={beforeCreate(){let e=this.$options.effector;if("function"==typeof e&&(e=e.call(this)),!e)return;this.$options.computed||(this.$options.computed={}),this.__clear=effector.createEvent(),this.__forwards=[];let o={};effector.withRegion(this.__clear,()=>{if(effector.is.store(e)){let r='state',s=t.observable({[r]:e.getState()}),i=effector.createEvent(),f=effector.forward({from:i,to:e});this.__forwards.push(f),e.watch(e=>{s[r]=e}),o[r]={get:()=>s[r],set:i}}else{if('object'!=typeof e||null===e)throw Error('property should be Store');{let r={},s=0;for(let t in e){let o=e[t];if(effector.is.store(o))r[t]=o;else{if(!effector.is.unit(o))throw Error('property should be Store or Unit (will be transform to Store<number>)');r[t]=effector.restore(o.map(()=>++s),null)}}let i=effector.combine(r),f=t.observable(i.defaultState);i.watch(e=>{for(let t in e)f[t]=e[t]});for(let e in f){let t=effector.createEvent(),s=effector.forward({from:t,to:r[e]});this.__forwards.push(s),o[e]={get:()=>f[e],set:t}}}}});for(let e in o)this.$options.computed[e]=o[e]},beforeDestroy(){this.__clear&&(effector.clearNode(this.__clear),this.__forwards.forEach(e=>{e()}))}};e.VueEffector=e=>{e.mixin(s),e.prototype.$watchAsStore=o,e.prototype.$store=r},e.createComponent=(e,o)=>t.extend(Object.assign({},e,o&&{effector:()=>o})),Object.defineProperty(e,'__esModule',{value:1})}));
((e,t)=>{'object'==typeof exports&&'undefined'!=typeof module?t(exports,require('vue'),require('effector')):'function'==typeof define&&define.amd?define(['exports','vue','effector'],t):t((e='undefined'!=typeof globalThis?globalThis:e||self).effectorVue={},e.Vue,e.effector)})(this,(function(e,t,effector){function o(e){return e&&'object'==typeof e&&'default'in e?e:{default:e}}function r(e,t={immediate:1}){let o=effector.createEvent(),r=effector.restore(o,{}),i=()=>{this.$watch(e,((e,t)=>{o({oldValue:t,newValue:e})}),t)};return this._data?i():this.$once('hook:created',i),r}function i(e){return this.$watchAsStore(e).map((({newValue:e})=>e))}var f=o(t);const s={beforeCreate(){let e=this.$options.effector;if("function"==typeof e&&(e=e.call(this)),!e)return;this.$options.computed||(this.$options.computed={});let t={};if(effector.is.store(e))t={state:e};else{if('object'!=typeof e)throw Error('property should be Store');t={...e}}this.__clear=effector.createEvent(),effector.withRegion(this.__clear,(()=>{let e={},o=0;for(let r in t){let i=t[r];if(effector.is.store(i))e[r]=i;else{if(!effector.is.event(i)&&!effector.is.effect(i))throw Error(`Effector property ${r} should be Store or Unit (will be transform to Store<number>)`);e[r]=effector.restore(i.map((()=>++o)),null)}}let r=effector.combine(e),i=f.default.observable({state:r.defaultState});r.watch((e=>i.state=e));for(let t in e){let o=effector.createEvent();effector.forward({from:o,to:e[t]}),this.$options.computed[t]={get:()=>i.state[t],set:o}}}))},beforeDestroy(){this.__clear&&effector.clearNode(this.__clear)}};e.VueEffector=e=>{e.mixin(s),e.prototype.$watchAsStore=r,e.prototype.$store=i},e.createComponent=(e,t)=>f.default.extend(Object.assign({},e,t&&{effector:()=>t})),Object.defineProperty(e,'__esModule',{value:1})}));
//# sourceMappingURL=effector-vue.umd.js.map
{
"name": "effector-vue",
"version": "21.0.3",
"version": "21.1.0",
"description": "Vue bindings for effector",

@@ -12,5 +12,10 @@ "main": "effector-vue.cjs.js",

},
"./composition": {
"require": "./composition.cjs.js",
"default": "./composition.mjs"
},
"./effector-vue.mjs": "./effector-vue.mjs",
"./composition.mjs": "./composition.mjs",
"./compat": "./compat.js",
"./effector-vue.umd": "./effector-react.umd.js"
"./effector-vue.umd": "./effector-vue.umd.js"
},

@@ -22,3 +27,5 @@ "umd:main": "effector-vue.umd.js",

"vue": "*",
"effector": "^21.0.2"
"effector": "^21.0.2",
"@vue/reactivity": "^3.0.2",
"@vue/runtime-core": "^3.0.2"
},

@@ -44,3 +51,10 @@ "files": [

"effector-vue.umd.d.ts",
"compat.d.ts"
"compat.d.ts",
"composition.cjs.js",
"composition.cjs.js.map",
"composition.mjs",
"composition.mjs.map",
"composition.d.ts",
"composition.mjs.d.ts",
"composition.cjs.d.ts"
],

@@ -70,5 +84,5 @@ "keywords": [

"scripts": {},
"repository": "https://github.com/zerobias/effector",
"bugs": "https://github.com/zerobias/effector/issues",
"homepage": "https://effector.now.sh",
"repository": "https://github.com/effector/effector",
"bugs": "https://github.com/effector/effector/issues",
"homepage": "https://effector.dev",
"engines": {

@@ -75,0 +89,0 @@ "node": ">=6.0.0"

@@ -1,1 +0,1 @@

# Effector-vue
# effector-vue

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc