@number-flow/vue
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("number-flow"),f=Symbol(),p=e.defineComponent({__name:"NumberFlowGroup",setup(s){const u=new Set;let l=!1;const o=(a,m)=>{u.add(a),e.watch(m,async()=>{l||(l=!0,u.forEach(t=>{var i;(i=t.value)==null||i.willUpdate()}),await e.nextTick(),u.forEach(t=>{var i;(i=t.value)==null||i.didUpdate()}),l=!1)}),e.onUnmounted(()=>{u.delete(a)})};return e.provide(f,o),(a,m)=>e.renderSlot(a.$slots,"default")}}),g=["manual","trend","continuous","animated","transformTiming","spinTiming","opacityTiming","respectMotionPreference","data-will-change","innerHTML","parts"],w=e.defineComponent({inheritAttrs:!1,__name:"index",props:{transformTiming:{default:()=>n.NumberFlowLite.defaultProps.transformTiming},spinTiming:{default:()=>n.NumberFlowLite.defaultProps.spinTiming},opacityTiming:{default:()=>n.NumberFlowLite.defaultProps.opacityTiming},animated:{type:Boolean,default:()=>n.NumberFlowLite.defaultProps.animated},respectMotionPreference:{type:Boolean,default:()=>n.NumberFlowLite.defaultProps.respectMotionPreference},trend:{type:[Boolean,String],default:()=>n.NumberFlowLite.defaultProps.trend},continuous:{type:Boolean,default:()=>n.NumberFlowLite.defaultProps.continuous},locales:{},format:{},value:{},willChange:{type:Boolean,default:!1}},emits:["animationsstart","animationsfinish"],setup(s,{expose:u,emit:l}){const o=e.ref();u({el:o});const a=l,m=e.computed(()=>new Intl.NumberFormat(s.locales,s.format)),t=e.computed(()=>n.partitionParts(s.value,m.value)),i=e.inject(f,void 0);return i==null||i(o,t),(r,d)=>(e.openBlock(),e.createElementBlock("number-flow-vue",e.mergeProps({ref_key:"el",ref:o},r.$attrs,{manual:!!e.unref(i),trend:r.trend,continuous:r.continuous,animated:r.animated,transformTiming:r.transformTiming,spinTiming:r.spinTiming,opacityTiming:r.opacityTiming,respectMotionPreference:r.respectMotionPreference,"data-will-change":r.willChange?"":void 0,innerHTML:e.unref(n.render)({formatted:t.value.formatted,willChange:r.willChange}),onAnimationsstart:d[0]||(d[0]=c=>a("animationsstart")),onAnimationsfinish:d[1]||(d[1]=c=>a("animationsfinish")),parts:t.value}),null,16,g))}});n.define("number-flow-vue",n.NumberFlowLite);function v({respectMotionPreference:s=!0}={}){const u=e.ref(n.canAnimate),l=e.ref(!1);return e.onMounted(()=>{var o;u.value=n.canAnimate,l.value=((o=n.prefersReducedMotion)==null?void 0:o.matches)??!1}),e.watchEffect(o=>{var m;if(!e.toValue(s))return;const a=({matches:t})=>{l.value=t};(m=n.prefersReducedMotion)==null||m.addEventListener("change",a),o(()=>{var t;(t=n.prefersReducedMotion)==null||t.removeEventListener("change",a)})}),e.computed(()=>u.value&&(!e.toValue(s)||!l.value))}Object.defineProperty(exports,"NumberFlowElement",{enumerable:!0,get:()=>n.NumberFlowLite});exports.NumberFlowGroup=p;exports.default=w;exports.useCanAnimate=v; | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("number-flow"),f=Symbol(),p=e.defineComponent({__name:"NumberFlowGroup",setup(l){const u=new Set;let r=!1;const a=(o,s)=>{u.add(o),e.watch(s,async()=>{r||(r=!0,u.forEach(async t=>{var m;!t.value||!t.value.created||(t.value.willUpdate(),await e.nextTick(),(m=t.value)==null||m.didUpdate())}),await e.nextTick(),r=!1)}),e.onUnmounted(()=>{u.delete(o)})};return e.provide(f,a),(o,s)=>e.renderSlot(o.$slots,"default")}}),g=["manual","trend","continuous","animated","transformTiming","spinTiming","opacityTiming","respectMotionPreference","data-will-change","innerHTML","parts"],v=e.defineComponent({inheritAttrs:!1,__name:"index",props:{transformTiming:{default:()=>n.NumberFlowLite.defaultProps.transformTiming},spinTiming:{default:()=>n.NumberFlowLite.defaultProps.spinTiming},opacityTiming:{default:()=>n.NumberFlowLite.defaultProps.opacityTiming},animated:{type:Boolean,default:()=>n.NumberFlowLite.defaultProps.animated},respectMotionPreference:{type:Boolean,default:()=>n.NumberFlowLite.defaultProps.respectMotionPreference},trend:{type:[Boolean,String],default:()=>n.NumberFlowLite.defaultProps.trend},continuous:{type:Boolean,default:()=>n.NumberFlowLite.defaultProps.continuous},locales:{},format:{},value:{},willChange:{type:Boolean,default:!1}},emits:["animationsstart","animationsfinish"],setup(l,{expose:u,emit:r}){const a=e.ref();u({el:a});const o=r,s=e.computed(()=>new Intl.NumberFormat(l.locales,l.format)),t=e.computed(()=>n.partitionParts(l.value,s.value)),m=e.inject(f,void 0);return m==null||m(a,t),(i,d)=>(e.openBlock(),e.createElementBlock("number-flow-vue",e.mergeProps({ref_key:"el",ref:a},i.$attrs,{manual:!!e.unref(m),trend:i.trend,continuous:i.continuous,animated:i.animated,transformTiming:i.transformTiming,spinTiming:i.spinTiming,opacityTiming:i.opacityTiming,respectMotionPreference:i.respectMotionPreference,"data-will-change":i.willChange?"":void 0,innerHTML:e.unref(n.render)({formatted:t.value.formatted,willChange:i.willChange}),onAnimationsstart:d[0]||(d[0]=c=>o("animationsstart")),onAnimationsfinish:d[1]||(d[1]=c=>o("animationsfinish")),parts:t.value}),null,16,g))}});n.define("number-flow-vue",n.NumberFlowLite);function w({respectMotionPreference:l=!0}={}){const u=e.ref(n.canAnimate),r=e.ref(!1);return e.onMounted(()=>{var a;u.value=n.canAnimate,r.value=((a=n.prefersReducedMotion)==null?void 0:a.matches)??!1}),e.watchEffect(a=>{var s;if(!e.toValue(l))return;const o=({matches:t})=>{r.value=t};(s=n.prefersReducedMotion)==null||s.addEventListener("change",o),a(()=>{var t;(t=n.prefersReducedMotion)==null||t.removeEventListener("change",o)})}),e.computed(()=>u.value&&(!e.toValue(l)||!r.value))}Object.defineProperty(exports,"NumberFlowElement",{enumerable:!0,get:()=>n.NumberFlowLite});exports.NumberFlowGroup=p;exports.default=v;exports.useCanAnimate=w; |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"author": { | ||
@@ -47,3 +47,3 @@ "name": "Maxwell Barvian", | ||
"dependencies": { | ||
"number-flow": "0.3.6" | ||
"number-flow": "0.3.7" | ||
}, | ||
@@ -50,0 +50,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
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
11828
155
+ Addedmagic-string@0.30.14(transitive)
+ Addednanoid@3.3.8(transitive)
+ Addednumber-flow@0.3.7(transitive)
- Removedmagic-string@0.30.13(transitive)
- Removednanoid@3.3.7(transitive)
- Removednumber-flow@0.3.6(transitive)
Updatednumber-flow@0.3.7