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

@untemps/react-vocal

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@untemps/react-vocal - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

7

CHANGELOG.md

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

## [1.0.2](https://github.com/untemps/react-vocal/compare/v1.0.1...v1.0.2) (2020-06-23)
### Bug Fixes
* Fix package.json ([#6](https://github.com/untemps/react-vocal/issues/6)) ([6c3397f](https://github.com/untemps/react-vocal/commit/6c3397f1aca059cc753793df440770abdb6534fd))
## [1.0.1](https://github.com/untemps/react-vocal/compare/v1.0.0...v1.0.1) (2020-06-17)

@@ -2,0 +9,0 @@

4

dist/index.es.js

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

import e,{useRef as t,useState as n,useEffect as r,cloneElement as i,isValidElement as o}from"react";import a from"prop-types";function c(e,t,n,r,i,o,a){try{var c=e[o](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,i)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t,n,r,i,o,a){try{var c=e[o](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,i)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){d(o,r,i,a,c,"next",e)}function c(e){d(o,r,i,a,c,"throw",e)}a(void 0)}))}}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var E=function(){var e=m(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=m(regeneratorRuntime.mark((function e(r,i){var o,a,c,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.permissions){e.next=4;break}i(new Error("PERMISSIONS_NOT_SUPPORTED")),e.next=37;break;case 4:return e.prev=4,e.next=7,navigator.permissions.query({name:t});case 7:if("denied"!==(o=e.sent).state){e.next=12;break}i(new Error("DENIED_BY_USER")),e.next=32;break;case 12:if(navigator.mediaDevices){e.next=16;break}i(new Error("MEDIA_DEVICES_NOT_SUPPORTED")),e.next=32;break;case 16:return e.next=18,navigator.mediaDevices.getUserMedia(n);case 18:if(e.t0=e.sent,a=[e.t0],"prompt"!==o.state){e.next=26;break}return e.t1=a,e.next=24,new Promise((function(e){o.addEventListener("change",(function(t){"denied"===t.target.state?i(new Error("DENIED_BY_USER")):e()}))}));case 24:e.t2=e.sent,e.t1.push.call(e.t1,e.t2);case 26:return e.next=28,Promise.all(a);case 28:c=e.sent,s=y(c,1),u=s[0],r(u);case 32:e.next=37;break;case 34:e.prev=34,e.t3=e.catch(4),i(e.t3);case 37:case"end":return e.stop()}}),e,null,[[4,34]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),w=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"_instance",null),l(this,"_listeners",null),l(this,"_includesEventType",(function(t){return Object.values(e.eventTypes).find((function(e){return e===t}))}));var r=window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition||{};this._instance=new r,this._listeners={},Object.entries(v(v({},e.defaultOptions),t||{})).forEach((function(e){var t=p(e,2),r=t[0],i=t[1];return n._instance[r]=i}))}var t,n;return u(e,null,[{key:"isSupported",get:function(){return!!(window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition)},set:function(e){throw new Error("You cannot set isSupported directly.")}}]),u(e,[{key:"start",value:(t=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._instance){e.next=14;break}return e.prev=1,e.next=4,E("microphone",{audio:!0});case 4:if(e.sent){e.next=7;break}throw new Error("Unable to retrieve the stream from media device");case 7:this._instance.start(),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(1),(t=this._listeners.error)&&t(e.t0);case 14:return e.abrupt("return",this);case 15:case"end":return e.stop()}}),e,this,[[1,10]])})),n=function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(e){c(o,r,i,a,s,"next",e)}function s(e){c(o,r,i,a,s,"throw",e)}a(void 0)}))},function(){return n.apply(this,arguments)})},{key:"stop",value:function(){return this._instance&&this._instance.stop(),this}},{key:"abort",value:function(){return this._instance&&this._instance.abort(),this}},{key:"addEventListener",value:function(t,n){var r=this;if(this._instance&&this._includesEventType(t)){this._listeners[t]&&this.removeEventListener(t);var i=function(i){var o=[];t===e.eventTypes.RESULT&&i.results&&i.results.length>0&&o.push(i.results[0][0].transcript),n&&n.apply(r,[].concat(o,[i]))};this._instance.addEventListener(t,(function(e){return i(e)})),this._listeners[t]=i}return this}},{key:"removeEventListener",value:function(e){var t=this._listeners[e];return this._instance.removeEventListener(e,t),delete this._listeners[e],this}},{key:"cleanup",value:function(){var e=this;return this.stop(),Object.keys(this._listeners).forEach((function(t){return e.removeEventListener(t)})),this._instance=null,this}},{key:"instance",get:function(){return this._instance},set:function(e){throw new Error("You cannot set instance directly.")}}]),e}();l(w,"defaultOptions",{lang:"fr-FR",continuous:!1,interimResults:!1,maxAlternatives:1}),l(w,"eventTypes",{AUDIO_END:"audioend",AUDIO_START:"audiostart",END:"end",ERROR:"error",NO_MATCH:"nomatch",RESULT:"result",SOUND_END:"soundend",SOUND_START:"soundstart",SPEECH_END:"speechend",SPEECH_START:"speechstart",START:"start"});var S=function(t){var n=t.iconColor,r=void 0===n?"black":n,i=t.activeColor,o=void 0===i?"red":i,a=t.isActive,c=void 0!==a&&a;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24"},e.createElement("g",null,e.createElement("path",{fill:r,d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"}),c&&e.createElement("circle",{fill:o,cx:"16",cy:"4",r:"4"})))},g=function(a){var c=a.children,s=a.timeout,u=a.ariaLabel,l=a.tabIndex,f=a.style,h=a.className,d=a.onStart,m=a.onEnd,y=a.onSpeechStart,b=a.onSpeechEnd,E=a.onResult,g=a.onError,_=a.onNoMatch,O=a.__recognitionInstance,R=t(null),x=t(null),k=p(n(!1),2),L=k[0],T=k[1];r((function(){if(w.isSupported)return x.current=O||new w,function(){x.current.abort(),x.current.cleanup(),clearTimeout(R.current)}}),[O]);var j=function(){R.current=setTimeout(I,s)},P=function(){clearTimeout(R.current),R.current=null},A=function(){try{T(!1);var e=x.current;e.removeEventListener("start",D),e.removeEventListener("end",I),e.removeEventListener("speechstart",N),e.removeEventListener("speechend",U),e.removeEventListener("result",C),e.removeEventListener("error",M),e.removeEventListener("nomatch",z),e.stop()}catch(e){M(e)}},D=function(e){j(),d&&d(e)},I=function(e){P(),A(),m&&m(e)},N=function(e){P(),y&&y(e)},U=function(e){j(),b&&b(e)},C=function(e,t){A(),E&&E(e,t)},M=function(e){A(),g&&g(e)},z=function(e){_&&_(e)};return w.isSupported&&i(o(c)?c:e.createElement("div",{"data-testid":"__vocal-root__",role:"button","aria-label":u,tabIndex:l,style:h?null:v({width:24,height:24,cursor:L?null:"pointer"},f),className:h},e.createElement(S,{isActive:L,iconColor:"#aaa"})),v({},!L&&{onClick:function(){!function(){try{T(!0);var e=x.current;e.addEventListener("start",D),e.addEventListener("end",I),e.addEventListener("speechstart",N),e.addEventListener("speechend",U),e.addEventListener("result",C),e.addEventListener("error",M),e.addEventListener("nomatch",z),e.start()}catch(e){M(e)}}()}}))};g.propTypes={timeout:a.number,ariaLabel:a.string,tabIndex:a.number,style:a.object,className:a.string,onStart:a.func,onEnd:a.func,onSpeechStart:a.func,onSpeechEnd:a.func,onResult:a.func,onError:a.func,onNoMatch:a.func},g.defaultProps={timeout:3e3,ariaLabel:"speech",tabIndex:-1,style:null,className:null,onStart:null,onEnd:null,onSpeechStart:null,onSpeechEnd:null,onResult:null,onError:null,onNoMatch:null};export default g;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZXMuanMiLCJzb3VyY2VzIjpbIi4uL25vZGVfbW9kdWxlcy9AdW50ZW1wcy91c2VyLW1lZGlhLXV0aWxzL2Rpc3QvaW5kZXguZXMuanMiLCIuLi9zcmMvU3BlZWNoUmVjb2duaXRpb25XcmFwcGVyLmpzIiwiLi4vc3JjL01pY3JvcGhvbmVJY29uLmpzIiwiLi4vc3JjL1ZvY2FsLmpzIl0sInNvdXJjZXNDb250ZW50IjpbImZ1bmN0aW9uIGUoZSxyLHQsbixhLG8saSl7dHJ5e3ZhciB1PWVbb10oaSksYz11LnZhbHVlfWNhdGNoKGUpe3JldHVybiB2b2lkIHQoZSl9dS5kb25lP3IoYyk6UHJvbWlzZS5yZXNvbHZlKGM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0FDWEMsUUFBUyxLQUNUQyxNQUFPLEtBQ1BDLGNBQWUsS0FDZkMsWUFBYSxLQUNiQyxTQUFVLEtBQ1ZDLFFBQVMsS0FDVEMsVUFBVyJ9
import e,{useRef as t,useState as n,useEffect as r,cloneElement as o,isValidElement as i}from"react";import a from"prop-types";function c(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){d(i,r,o,a,c,"next",e)}function c(e){d(i,r,o,a,c,"throw",e)}a(void 0)}))}}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var E=function(){var e=m(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=m(regeneratorRuntime.mark((function e(n,r){var o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.permissions){e.next=4;break}r(new DOMException("NOT_FOUND_ERR","NotFoundError")),e.next=22;break;case 4:return e.prev=4,e.next=7,navigator.permissions.query({name:t});case 7:o=e.sent,e.t0=o.state,e.next="denied"===e.t0?11:"prompt"===e.t0?13:16;break;case 11:return r(new DOMException("NOT_ALLOWED_ERR","NotAllowedError")),e.abrupt("break",17);case 13:return i=function e(t){o.removeEventListener("change",e),"denied"===t.target.state?r(new DOMException("NOT_ALLOWED_ERR","NotAllowedError")):n(t.target.state)},o.addEventListener("change",i),e.abrupt("break",17);case 16:n(o.state);case 17:e.next=22;break;case 19:e.prev=19,e.t1=e.catch(4),r(e.t1);case 22:case"end":return e.stop()}}),e,null,[[4,19]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=m(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=m(regeneratorRuntime.mark((function e(r,o){var i,a,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.mediaDevices){e.next=4;break}o(new DOMException("NOT_FOUND_ERR","NotFoundError")),e.next=24;break;case 4:return e.prev=4,e.t0=Promise,e.next=8,E(t);case 8:return e.t1=e.sent,e.next=11,navigator.mediaDevices.getUserMedia(n);case 11:return e.t2=e.sent,e.t3=[e.t1,e.t2],e.next=15,e.t0.all.call(e.t0,e.t3);case 15:i=e.sent,a=y(i,2),c=a[1],r(c),e.next=24;break;case 21:e.prev=21,e.t4=e.catch(4),o(e.t4);case 24:case"end":return e.stop()}}),e,null,[[4,21]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),g=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"_instance",null),l(this,"_listeners",null),l(this,"_includesEventType",(function(t){return Object.values(e.eventTypes).find((function(e){return e===t}))}));var r=window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition||{};this._instance=new r,this._listeners={},Object.entries(p(p({},e.defaultOptions),t||{})).forEach((function(e){var t=v(e,2),r=t[0],o=t[1];return n._instance[r]=o}))}var t,n;return s(e,null,[{key:"isSupported",get:function(){return!!(window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition)},set:function(e){throw new Error("You cannot set isSupported directly.")}}]),s(e,[{key:"start",value:(t=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._instance){e.next=14;break}return e.prev=1,e.next=4,w("microphone",{audio:!0});case 4:if(e.sent){e.next=7;break}throw new Error("Unable to retrieve the stream from media device");case 7:this._instance.start(),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(1),(t=this._listeners.error)&&t(e.t0);case 14:return e.abrupt("return",this);case 15:case"end":return e.stop()}}),e,this,[[1,10]])})),n=function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(e){c(i,r,o,a,u,"next",e)}function u(e){c(i,r,o,a,u,"throw",e)}a(void 0)}))},function(){return n.apply(this,arguments)})},{key:"stop",value:function(){return this._instance&&this._instance.stop(),this}},{key:"abort",value:function(){return this._instance&&this._instance.abort(),this}},{key:"addEventListener",value:function(t,n){var r=this;if(this._instance&&this._includesEventType(t)){this._listeners[t]&&this.removeEventListener(t);var o=function(o){var i=[];t===e.eventTypes.RESULT&&o.results&&o.results.length>0&&i.push(o.results[0][0].transcript),n&&n.apply(r,[].concat(i,[o]))};this._instance.addEventListener(t,(function(e){return o(e)})),this._listeners[t]=o}return this}},{key:"removeEventListener",value:function(e){var t=this._listeners[e];return this._instance.removeEventListener(e,t),delete this._listeners[e],this}},{key:"cleanup",value:function(){var e=this;return this.stop(),Object.keys(this._listeners).forEach((function(t){return e.removeEventListener(t)})),this._instance=null,this}},{key:"instance",get:function(){return this._instance},set:function(e){throw new Error("You cannot set instance directly.")}}]),e}();l(g,"defaultOptions",{lang:"fr-FR",continuous:!1,interimResults:!1,maxAlternatives:1}),l(g,"eventTypes",{AUDIO_END:"audioend",AUDIO_START:"audiostart",END:"end",ERROR:"error",NO_MATCH:"nomatch",RESULT:"result",SOUND_END:"soundend",SOUND_START:"soundstart",SPEECH_END:"speechend",SPEECH_START:"speechstart",START:"start"});var S=function(t){var n=t.iconColor,r=void 0===n?"black":n,o=t.activeColor,i=void 0===o?"red":o,a=t.isActive,c=void 0!==a&&a;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24"},e.createElement("g",null,e.createElement("path",{fill:r,d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"}),c&&e.createElement("circle",{fill:i,cx:"16",cy:"4",r:"4"})))},O=function(a){var c=a.children,u=a.timeout,s=a.ariaLabel,l=a.tabIndex,f=a.style,h=a.className,d=a.onStart,m=a.onEnd,y=a.onSpeechStart,b=a.onSpeechEnd,E=a.onResult,w=a.onError,O=a.onNoMatch,_=a.__recognitionInstance,R=t(null),x=t(null),k=v(n(!1),2),L=k[0],T=k[1];r((function(){if(g.isSupported)return x.current=_||new g,function(){x.current.abort(),x.current.cleanup(),clearTimeout(R.current)}}),[_]);var A=function(){R.current=setTimeout(P,u)},j=function(){clearTimeout(R.current),R.current=null},N=function(){try{T(!1);var e=x.current;e.removeEventListener("start",D),e.removeEventListener("end",P),e.removeEventListener("speechstart",I),e.removeEventListener("speechend",M),e.removeEventListener("result",U),e.removeEventListener("error",C),e.removeEventListener("nomatch",F),e.stop()}catch(e){w&&w(e)}},D=function(e){A(),d&&d(e)},P=function(e){j(),N(),m&&m(e)},I=function(e){j(),y&&y(e)},M=function(e){A(),b&&b(e)},U=function(e,t){N(),E&&E(e,t)},C=function(e){N(),w&&w(e)},F=function(e){O&&O(e)};return g.isSupported&&o(i(c)?c:e.createElement("div",{"data-testid":"__vocal-root__",role:"button","aria-label":s,tabIndex:l,style:h?null:p({width:24,height:24,cursor:L?null:"pointer"},f),className:h},e.createElement(S,{isActive:L,iconColor:"#aaa"})),p({},!L&&{onClick:function(){!function(){try{T(!0);var e=x.current;e.addEventListener("start",D),e.addEventListener("end",P),e.addEventListener("speechstart",I),e.addEventListener("speechend",M),e.addEventListener("result",U),e.addEventListener("error",C),e.addEventListener("nomatch",F),e.start()}catch(e){C(e)}}()}}))};O.propTypes={timeout:a.number,ariaLabel:a.string,tabIndex:a.number,style:a.object,className:a.string,onStart:a.func,onEnd:a.func,onSpeechStart:a.func,onSpeechEnd:a.func,onResult:a.func,onError:a.func,onNoMatch:a.func},O.defaultProps={timeout:3e3,ariaLabel:"speech",tabIndex:-1,style:null,className:null,onStart:null,onEnd:null,onSpeechStart:null,onSpeechEnd:null,onResult:null,onError:null,onNoMatch:null};export default O;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZXMuanMiLCJzb3VyY2VzIjpbIi4uL25vZGVfbW9kdWxlcy9AdW50ZW1wcy91c2VyLXBlcm1pc3Npb25zLXV0aWxzL2Rpc3QvaW5kZXguZXMuanMiLCIuLi9zcmMvU3BlZWNoUmVjb2duaXRpb25XcmFwcGVyLmpzIiwiLi4vc3JjL01pY3JvcGhvbmVJY29uLmpzIiwiLi4vc3JjL1ZvY2FsLmpzIl0sInNvdXJjZXNDb250ZW50IjpbImZ1bmN0aW9uIGUoZSxyLHQsbixhLG8saSl7dHJ5e3ZhciB1PWVbb10oaSksYz11LnZhbHVlfWNhdGNoKGUpe3JldHVybiB2b2lkIHQoZSl9dS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T0UsR0FDUjJFLEVBQVMzRSxJQWdDVm1GLFFBZ0VGM0MsRUFBTTRDLFVBQVksQ0FFakIxQyxRQUFTMkMsRUFBVUMsT0FFbkIzQyxVQUFXMEMsRUFBVUUsT0FFckIzQyxTQUFVeUMsRUFBVUMsT0FFcEJ6QyxNQUFPd0MsRUFBVUcsT0FFakIxQyxVQUFXdUMsRUFBVUUsT0FFckJ4QyxRQUFTc0MsRUFBVUksS0FFbkJ6QyxNQUFPcUMsRUFBVUksS0FFakJ4QyxjQUFlb0MsRUFBVUksS0FFekJ2QyxZQUFhbUMsRUFBVUksS0FFdkJ0QyxTQUFVa0MsRUFBVUksS0FFcEJyQyxRQUFTaUMsRUFBVUksS0FFbkJwQyxVQUFXZ0MsRUFBVUksTUFHdEJqRCxFQUFNa0QsYUFBZSxDQUNwQmhELFFBQVMsSUFDVEMsVUFBVyxTQUNYQyxVQUFXLEVBQ1hDLE1BQU8sS0FDUEMsVUFBVyxLQUNYQyxRQUFTLEtBQ1RDLE1BQU8sS0FDUEMsY0FBZSxLQUNmQyxZQUFhLEtBQ2JDLFNBQVUsS0FDVkMsUUFBUyxLQUNUQyxVQUFXIn0=

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

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=require("react"),n=e(t),r=e(require("prop-types"));function i(e,t,n,r,i,o,a){try{var c=e[o](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,i)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t,n,r,i,o,a){try{var c=e[o](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,i)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){v(o,r,i,a,c,"next",e)}function c(e){v(o,r,i,a,c,"throw",e)}a(void 0)}))}}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var m=function(){var e=h(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=h(regeneratorRuntime.mark((function e(r,i){var o,a,c,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.permissions){e.next=4;break}i(new Error("PERMISSIONS_NOT_SUPPORTED")),e.next=37;break;case 4:return e.prev=4,e.next=7,navigator.permissions.query({name:t});case 7:if("denied"!==(o=e.sent).state){e.next=12;break}i(new Error("DENIED_BY_USER")),e.next=32;break;case 12:if(navigator.mediaDevices){e.next=16;break}i(new Error("MEDIA_DEVICES_NOT_SUPPORTED")),e.next=32;break;case 16:return e.next=18,navigator.mediaDevices.getUserMedia(n);case 18:if(e.t0=e.sent,a=[e.t0],"prompt"!==o.state){e.next=26;break}return e.t1=a,e.next=24,new Promise((function(e){o.addEventListener("change",(function(t){"denied"===t.target.state?i(new Error("DENIED_BY_USER")):e()}))}));case 24:e.t2=e.sent,e.t1.push.call(e.t1,e.t2);case 26:return e.next=28,Promise.all(a);case 28:c=e.sent,s=p(c,1),u=s[0],r(u);case 32:e.next=37;break;case 34:e.prev=34,e.t3=e.catch(4),i(e.t3);case 37:case"end":return e.stop()}}),e,null,[[4,34]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),y=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"_instance",null),c(this,"_listeners",null),c(this,"_includesEventType",(function(t){return Object.values(e.eventTypes).find((function(e){return e===t}))}));var r=window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition||{};this._instance=new r,this._listeners={},Object.entries(u(u({},e.defaultOptions),t||{})).forEach((function(e){var t=l(e,2),r=t[0],i=t[1];return n._instance[r]=i}))}var t,n;return a(e,null,[{key:"isSupported",get:function(){return!!(window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition)},set:function(e){throw new Error("You cannot set isSupported directly.")}}]),a(e,[{key:"start",value:(t=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._instance){e.next=14;break}return e.prev=1,e.next=4,m("microphone",{audio:!0});case 4:if(e.sent){e.next=7;break}throw new Error("Unable to retrieve the stream from media device");case 7:this._instance.start(),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(1),(t=this._listeners.error)&&t(e.t0);case 14:return e.abrupt("return",this);case 15:case"end":return e.stop()}}),e,this,[[1,10]])})),n=function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function c(e){i(a,r,o,c,s,"next",e)}function s(e){i(a,r,o,c,s,"throw",e)}c(void 0)}))},function(){return n.apply(this,arguments)})},{key:"stop",value:function(){return this._instance&&this._instance.stop(),this}},{key:"abort",value:function(){return this._instance&&this._instance.abort(),this}},{key:"addEventListener",value:function(t,n){var r=this;if(this._instance&&this._includesEventType(t)){this._listeners[t]&&this.removeEventListener(t);var i=function(i){var o=[];t===e.eventTypes.RESULT&&i.results&&i.results.length>0&&o.push(i.results[0][0].transcript),n&&n.apply(r,[].concat(o,[i]))};this._instance.addEventListener(t,(function(e){return i(e)})),this._listeners[t]=i}return this}},{key:"removeEventListener",value:function(e){var t=this._listeners[e];return this._instance.removeEventListener(e,t),delete this._listeners[e],this}},{key:"cleanup",value:function(){var e=this;return this.stop(),Object.keys(this._listeners).forEach((function(t){return e.removeEventListener(t)})),this._instance=null,this}},{key:"instance",get:function(){return this._instance},set:function(e){throw new Error("You cannot set instance directly.")}}]),e}();c(y,"defaultOptions",{lang:"fr-FR",continuous:!1,interimResults:!1,maxAlternatives:1}),c(y,"eventTypes",{AUDIO_END:"audioend",AUDIO_START:"audiostart",END:"end",ERROR:"error",NO_MATCH:"nomatch",RESULT:"result",SOUND_END:"soundend",SOUND_START:"soundstart",SPEECH_END:"speechend",SPEECH_START:"speechstart",START:"start"});var b=function(e){var t=e.iconColor,r=void 0===t?"black":t,i=e.activeColor,o=void 0===i?"red":i,a=e.isActive,c=void 0!==a&&a;return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24"},n.createElement("g",null,n.createElement("path",{fill:r,d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"}),c&&n.createElement("circle",{fill:o,cx:"16",cy:"4",r:"4"})))},E=function(e){var r=e.children,i=e.timeout,o=e.ariaLabel,a=e.tabIndex,c=e.style,s=e.className,f=e.onStart,v=e.onEnd,h=e.onSpeechStart,p=e.onSpeechEnd,d=e.onResult,m=e.onError,E=e.onNoMatch,w=e.__recognitionInstance,S=t.useRef(null),g=t.useRef(null),_=l(t.useState(!1),2),O=_[0],R=_[1];t.useEffect((function(){if(y.isSupported)return g.current=w||new y,function(){g.current.abort(),g.current.cleanup(),clearTimeout(S.current)}}),[w]);var x=function(){S.current=setTimeout(j,i)},k=function(){clearTimeout(S.current),S.current=null},L=function(){try{R(!1);var e=g.current;e.removeEventListener("start",T),e.removeEventListener("end",j),e.removeEventListener("speechstart",P),e.removeEventListener("speechend",A),e.removeEventListener("result",D),e.removeEventListener("error",I),e.removeEventListener("nomatch",N),e.stop()}catch(e){I(e)}},T=function(e){x(),f&&f(e)},j=function(e){k(),L(),v&&v(e)},P=function(e){k(),h&&h(e)},A=function(e){x(),p&&p(e)},D=function(e,t){L(),d&&d(e,t)},I=function(e){L(),m&&m(e)},N=function(e){E&&E(e)};return y.isSupported&&t.cloneElement(t.isValidElement(r)?r:n.createElement("div",{"data-testid":"__vocal-root__",role:"button","aria-label":o,tabIndex:a,style:s?null:u({width:24,height:24,cursor:O?null:"pointer"},c),className:s},n.createElement(b,{isActive:O,iconColor:"#aaa"})),u({},!O&&{onClick:function(){!function(){try{R(!0);var e=g.current;e.addEventListener("start",T),e.addEventListener("end",j),e.addEventListener("speechstart",P),e.addEventListener("speechend",A),e.addEventListener("result",D),e.addEventListener("error",I),e.addEventListener("nomatch",N),e.start()}catch(e){I(e)}}()}}))};E.propTypes={timeout:r.number,ariaLabel:r.string,tabIndex:r.number,style:r.object,className:r.string,onStart:r.func,onEnd:r.func,onSpeechStart:r.func,onSpeechEnd:r.func,onResult:r.func,onError:r.func,onNoMatch:r.func},E.defaultProps={timeout:3e3,ariaLabel:"speech",tabIndex:-1,style:null,className:null,onStart:null,onEnd:null,onSpeechStart:null,onSpeechEnd:null,onResult:null,onError:null,onNoMatch:null},module.exports=E;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbIi4uL25vZGVfbW9kdWxlcy9AdW50ZW1wcy91c2VyLW1lZGlhLXV0aWxzL2Rpc3QvaW5kZXguZXMuanMiLCIuLi9zcmMvU3BlZWNoUmVjb2duaXRpb25XcmFwcGVyLmpzIiwiLi4vc3JjL01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QUV6QnZDLFlBQWFtQyxFQUFVSSxLQUV2QnRDLFNBQVVrQyxFQUFVSSxLQUVwQnJDLFFBQVNpQyxFQUFVSSxLQUVuQnBDLFVBQVdnQyxFQUFVSSxNQUd0QmpELEVBQU1rRCxhQUFlLENBQ3BCaEQsUUFBUyxJQUNUQyxVQUFXLFNBQ1hDLFVBQVcsRUFDWEMsTUFBTyxLQUNQQyxVQUFXLEtBQ1hDLFFBQVMsS0FDVEMsTUFBTyxLQUNQQyxjQUFlLEtBQ2ZDLFlBQWEsS0FDYkMsU0FBVSxLQUNWQyxRQUFTLEtBQ1RDLFVBQVcifQ==
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=require("react"),n=e(t),r=e(require("prop-types"));function i(e,t,n,r,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,i)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t,n,r,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,i)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){p(o,r,i,a,c,"next",e)}function c(e){p(o,r,i,a,c,"throw",e)}a(void 0)}))}}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var m=function(){var e=v(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=v(regeneratorRuntime.mark((function e(n,r){var i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.permissions){e.next=4;break}r(new DOMException("NOT_FOUND_ERR","NotFoundError")),e.next=22;break;case 4:return e.prev=4,e.next=7,navigator.permissions.query({name:t});case 7:i=e.sent,e.t0=i.state,e.next="denied"===e.t0?11:"prompt"===e.t0?13:16;break;case 11:return r(new DOMException("NOT_ALLOWED_ERR","NotAllowedError")),e.abrupt("break",17);case 13:return o=function e(t){i.removeEventListener("change",e),"denied"===t.target.state?r(new DOMException("NOT_ALLOWED_ERR","NotAllowedError")):n(t.target.state)},i.addEventListener("change",o),e.abrupt("break",17);case 16:n(i.state);case 17:e.next=22;break;case 19:e.prev=19,e.t1=e.catch(4),r(e.t1);case 22:case"end":return e.stop()}}),e,null,[[4,19]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=v(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=v(regeneratorRuntime.mark((function e(r,i){var o,a,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.mediaDevices){e.next=4;break}i(new DOMException("NOT_FOUND_ERR","NotFoundError")),e.next=24;break;case 4:return e.prev=4,e.t0=Promise,e.next=8,m(t);case 8:return e.t1=e.sent,e.next=11,navigator.mediaDevices.getUserMedia(n);case 11:return e.t2=e.sent,e.t3=[e.t1,e.t2],e.next=15,e.t0.all.call(e.t0,e.t3);case 15:o=e.sent,a=h(o,2),c=a[1],r(c),e.next=24;break;case 21:e.prev=21,e.t4=e.catch(4),i(e.t4);case 24:case"end":return e.stop()}}),e,null,[[4,21]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),b=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"_instance",null),c(this,"_listeners",null),c(this,"_includesEventType",(function(t){return Object.values(e.eventTypes).find((function(e){return e===t}))}));var r=window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition||{};this._instance=new r,this._listeners={},Object.entries(s(s({},e.defaultOptions),t||{})).forEach((function(e){var t=l(e,2),r=t[0],i=t[1];return n._instance[r]=i}))}var t,n;return a(e,null,[{key:"isSupported",get:function(){return!!(window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition)},set:function(e){throw new Error("You cannot set isSupported directly.")}}]),a(e,[{key:"start",value:(t=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._instance){e.next=14;break}return e.prev=1,e.next=4,y("microphone",{audio:!0});case 4:if(e.sent){e.next=7;break}throw new Error("Unable to retrieve the stream from media device");case 7:this._instance.start(),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(1),(t=this._listeners.error)&&t(e.t0);case 14:return e.abrupt("return",this);case 15:case"end":return e.stop()}}),e,this,[[1,10]])})),n=function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function c(e){i(a,r,o,c,u,"next",e)}function u(e){i(a,r,o,c,u,"throw",e)}c(void 0)}))},function(){return n.apply(this,arguments)})},{key:"stop",value:function(){return this._instance&&this._instance.stop(),this}},{key:"abort",value:function(){return this._instance&&this._instance.abort(),this}},{key:"addEventListener",value:function(t,n){var r=this;if(this._instance&&this._includesEventType(t)){this._listeners[t]&&this.removeEventListener(t);var i=function(i){var o=[];t===e.eventTypes.RESULT&&i.results&&i.results.length>0&&o.push(i.results[0][0].transcript),n&&n.apply(r,[].concat(o,[i]))};this._instance.addEventListener(t,(function(e){return i(e)})),this._listeners[t]=i}return this}},{key:"removeEventListener",value:function(e){var t=this._listeners[e];return this._instance.removeEventListener(e,t),delete this._listeners[e],this}},{key:"cleanup",value:function(){var e=this;return this.stop(),Object.keys(this._listeners).forEach((function(t){return e.removeEventListener(t)})),this._instance=null,this}},{key:"instance",get:function(){return this._instance},set:function(e){throw new Error("You cannot set instance directly.")}}]),e}();c(b,"defaultOptions",{lang:"fr-FR",continuous:!1,interimResults:!1,maxAlternatives:1}),c(b,"eventTypes",{AUDIO_END:"audioend",AUDIO_START:"audiostart",END:"end",ERROR:"error",NO_MATCH:"nomatch",RESULT:"result",SOUND_END:"soundend",SOUND_START:"soundstart",SPEECH_END:"speechend",SPEECH_START:"speechstart",START:"start"});var E=function(e){var t=e.iconColor,r=void 0===t?"black":t,i=e.activeColor,o=void 0===i?"red":i,a=e.isActive,c=void 0!==a&&a;return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24"},n.createElement("g",null,n.createElement("path",{fill:r,d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"}),c&&n.createElement("circle",{fill:o,cx:"16",cy:"4",r:"4"})))},w=function(e){var r=e.children,i=e.timeout,o=e.ariaLabel,a=e.tabIndex,c=e.style,u=e.className,f=e.onStart,p=e.onEnd,v=e.onSpeechStart,h=e.onSpeechEnd,d=e.onResult,m=e.onError,y=e.onNoMatch,w=e.__recognitionInstance,g=t.useRef(null),S=t.useRef(null),O=l(t.useState(!1),2),_=O[0],R=O[1];t.useEffect((function(){if(b.isSupported)return S.current=w||new b,function(){S.current.abort(),S.current.cleanup(),clearTimeout(g.current)}}),[w]);var x=function(){g.current=setTimeout(j,i)},k=function(){clearTimeout(g.current),g.current=null},L=function(){try{R(!1);var e=S.current;e.removeEventListener("start",T),e.removeEventListener("end",j),e.removeEventListener("speechstart",A),e.removeEventListener("speechend",N),e.removeEventListener("result",D),e.removeEventListener("error",P),e.removeEventListener("nomatch",I),e.stop()}catch(e){m&&m(e)}},T=function(e){x(),f&&f(e)},j=function(e){k(),L(),p&&p(e)},A=function(e){k(),v&&v(e)},N=function(e){x(),h&&h(e)},D=function(e,t){L(),d&&d(e,t)},P=function(e){L(),m&&m(e)},I=function(e){y&&y(e)};return b.isSupported&&t.cloneElement(t.isValidElement(r)?r:n.createElement("div",{"data-testid":"__vocal-root__",role:"button","aria-label":o,tabIndex:a,style:u?null:s({width:24,height:24,cursor:_?null:"pointer"},c),className:u},n.createElement(E,{isActive:_,iconColor:"#aaa"})),s({},!_&&{onClick:function(){!function(){try{R(!0);var e=S.current;e.addEventListener("start",T),e.addEventListener("end",j),e.addEventListener("speechstart",A),e.addEventListener("speechend",N),e.addEventListener("result",D),e.addEventListener("error",P),e.addEventListener("nomatch",I),e.start()}catch(e){P(e)}}()}}))};w.propTypes={timeout:r.number,ariaLabel:r.string,tabIndex:r.number,style:r.object,className:r.string,onStart:r.func,onEnd:r.func,onSpeechStart:r.func,onSpeechEnd:r.func,onResult:r.func,onError:r.func,onNoMatch:r.func},w.defaultProps={timeout:3e3,ariaLabel:"speech",tabIndex:-1,style:null,className:null,onStart:null,onEnd:null,onSpeechStart:null,onSpeechEnd:null,onResult:null,onError:null,onNoMatch:null},module.exports=w;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbIi4uL25vZGVfbW9kdWxlcy9AdW50ZW1wcy91c2VyLXBlcm1pc3Npb25zLXV0aWxzL2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KLEVBQUVnRCxpQkFBaUIsTUFBT3dHLEdBQzFCeEosRUFBRWdELGlCQUFpQixjQUFlNEcsR0FDbEM1SixFQUFFZ0QsaUJBQWlCLFlBQWE2RyxHQUNoQzdKLEVBQUVnRCxpQkFBaUIsU0FBVThHLEdBQzdCOUosRUFBRWdELGlCQUFpQixRQUFTK0csR0FDNUIvSixFQUFFZ0QsaUJBQWlCLFVBQVdnSCxHQUM5QmhLLEVBQUVrRixRQUNELE1BQU9FLEdBQ1IyRSxFQUFTM0UsSUFnQ1ZtRixRQWdFRjNDLEVBQU00QyxVQUFZLENBRWpCMUMsUUFBUzJDLEVBQVVDLE9BRW5CM0MsVUFBVzBDLEVBQVVFLE9BRXJCM0MsU0FBVXlDLEVBQVVDLE9BRXBCekMsTUFBT3dDLEVBQVVHLE9BRWpCMUMsVUFBV3VDLEVBQVVFLE9BRXJCeEMsUUFBU3NDLEVBQVVJLEtBRW5CekMsTUFBT3FDLEVBQVVJLEtBRWpCeEMsY0FBZW9DLEVBQVVJLEtBRXpCdkMsWUFBYW1DLEVBQVVJLEtBRXZCdEMsU0FBVWtDLEVBQVVJLEtBRXBCckMsUUFBU2lDLEVBQVVJLEtBRW5CcEMsVUFBV2dDLEVBQVVJLE1BR3RCakQsRUFBTWtELGFBQWUsQ0FDcEJoRCxRQUFTLElBQ1RDLFVBQVcsU0FDWEMsVUFBVyxFQUNYQyxNQUFPLEtBQ1BDLFVBQVcsS0FDWEMsUUFBUyxLQUNUQyxNQUFPLEtBQ1BDLGNBQWUsS0FDZkMsWUFBYSxLQUNiQyxTQUFVLEtBQ1ZDLFFBQVMsS0FDVEMsVUFBVyJ9

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],t):(e=e||self)["react-vocal"]=t(e.React,e.PropTypes)}(this,(function(e,t){"use strict";var n="default"in e?e.default:e;function r(e,t,n,r,i,o,a){try{var c=e[o](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,i)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t,n,r,i,o,a){try{var c=e[o](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,i)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){f(o,r,i,a,c,"next",e)}function c(e){f(o,r,i,a,c,"throw",e)}a(void 0)}))}}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var h=function(){var e=p(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=p(regeneratorRuntime.mark((function e(r,i){var o,a,c,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.permissions){e.next=4;break}i(new Error("PERMISSIONS_NOT_SUPPORTED")),e.next=37;break;case 4:return e.prev=4,e.next=7,navigator.permissions.query({name:t});case 7:if("denied"!==(o=e.sent).state){e.next=12;break}i(new Error("DENIED_BY_USER")),e.next=32;break;case 12:if(navigator.mediaDevices){e.next=16;break}i(new Error("MEDIA_DEVICES_NOT_SUPPORTED")),e.next=32;break;case 16:return e.next=18,navigator.mediaDevices.getUserMedia(n);case 18:if(e.t0=e.sent,a=[e.t0],"prompt"!==o.state){e.next=26;break}return e.t1=a,e.next=24,new Promise((function(e){o.addEventListener("change",(function(t){"denied"===t.target.state?i(new Error("DENIED_BY_USER")):e()}))}));case 24:e.t2=e.sent,e.t1.push.call(e.t1,e.t2);case 26:return e.next=28,Promise.all(a);case 28:c=e.sent,s=v(c,1),u=s[0],r(u);case 32:e.next=37;break;case 34:e.prev=34,e.t3=e.catch(4),i(e.t3);case 37:case"end":return e.stop()}}),e,null,[[4,34]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),m=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"_instance",null),a(this,"_listeners",null),a(this,"_includesEventType",(function(t){return Object.values(e.eventTypes).find((function(e){return e===t}))}));var r=window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition||{};this._instance=new r,this._listeners={},Object.entries(s(s({},e.defaultOptions),t||{})).forEach((function(e){var t=u(e,2),r=t[0],i=t[1];return n._instance[r]=i}))}var t,n;return o(e,null,[{key:"isSupported",get:function(){return!!(window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition)},set:function(e){throw new Error("You cannot set isSupported directly.")}}]),o(e,[{key:"start",value:(t=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._instance){e.next=14;break}return e.prev=1,e.next=4,h("microphone",{audio:!0});case 4:if(e.sent){e.next=7;break}throw new Error("Unable to retrieve the stream from media device");case 7:this._instance.start(),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(1),(t=this._listeners.error)&&t(e.t0);case 14:return e.abrupt("return",this);case 15:case"end":return e.stop()}}),e,this,[[1,10]])})),n=function(){var e=this,n=arguments;return new Promise((function(i,o){var a=t.apply(e,n);function c(e){r(a,i,o,c,s,"next",e)}function s(e){r(a,i,o,c,s,"throw",e)}c(void 0)}))},function(){return n.apply(this,arguments)})},{key:"stop",value:function(){return this._instance&&this._instance.stop(),this}},{key:"abort",value:function(){return this._instance&&this._instance.abort(),this}},{key:"addEventListener",value:function(t,n){var r=this;if(this._instance&&this._includesEventType(t)){this._listeners[t]&&this.removeEventListener(t);var i=function(i){var o=[];t===e.eventTypes.RESULT&&i.results&&i.results.length>0&&o.push(i.results[0][0].transcript),n&&n.apply(r,[].concat(o,[i]))};this._instance.addEventListener(t,(function(e){return i(e)})),this._listeners[t]=i}return this}},{key:"removeEventListener",value:function(e){var t=this._listeners[e];return this._instance.removeEventListener(e,t),delete this._listeners[e],this}},{key:"cleanup",value:function(){var e=this;return this.stop(),Object.keys(this._listeners).forEach((function(t){return e.removeEventListener(t)})),this._instance=null,this}},{key:"instance",get:function(){return this._instance},set:function(e){throw new Error("You cannot set instance directly.")}}]),e}();a(m,"defaultOptions",{lang:"fr-FR",continuous:!1,interimResults:!1,maxAlternatives:1}),a(m,"eventTypes",{AUDIO_END:"audioend",AUDIO_START:"audiostart",END:"end",ERROR:"error",NO_MATCH:"nomatch",RESULT:"result",SOUND_END:"soundend",SOUND_START:"soundstart",SPEECH_END:"speechend",SPEECH_START:"speechstart",START:"start"});var y=function(e){var t=e.iconColor,r=void 0===t?"black":t,i=e.activeColor,o=void 0===i?"red":i,a=e.isActive,c=void 0!==a&&a;return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24"},n.createElement("g",null,n.createElement("path",{fill:r,d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"}),c&&n.createElement("circle",{fill:o,cx:"16",cy:"4",r:"4"})))},b=function(t){var r=t.children,i=t.timeout,o=t.ariaLabel,a=t.tabIndex,c=t.style,l=t.className,f=t.onStart,p=t.onEnd,v=t.onSpeechStart,d=t.onSpeechEnd,h=t.onResult,b=t.onError,E=t.onNoMatch,w=t.__recognitionInstance,S=e.useRef(null),g=e.useRef(null),_=u(e.useState(!1),2),O=_[0],R=_[1];e.useEffect((function(){if(m.isSupported)return g.current=w||new m,function(){g.current.abort(),g.current.cleanup(),clearTimeout(S.current)}}),[w]);var x=function(){S.current=setTimeout(L,i)},k=function(){clearTimeout(S.current),S.current=null},T=function(){try{R(!1);var e=g.current;e.removeEventListener("start",j),e.removeEventListener("end",L),e.removeEventListener("speechstart",P),e.removeEventListener("speechend",A),e.removeEventListener("result",D),e.removeEventListener("error",I),e.removeEventListener("nomatch",N),e.stop()}catch(e){I(e)}},j=function(e){x(),f&&f(e)},L=function(e){k(),T(),p&&p(e)},P=function(e){k(),v&&v(e)},A=function(e){x(),d&&d(e)},D=function(e,t){T(),h&&h(e,t)},I=function(e){T(),b&&b(e)},N=function(e){E&&E(e)};return m.isSupported&&e.cloneElement(e.isValidElement(r)?r:n.createElement("div",{"data-testid":"__vocal-root__",role:"button","aria-label":o,tabIndex:a,style:l?null:s({width:24,height:24,cursor:O?null:"pointer"},c),className:l},n.createElement(y,{isActive:O,iconColor:"#aaa"})),s({},!O&&{onClick:function(){!function(){try{R(!0);var e=g.current;e.addEventListener("start",j),e.addEventListener("end",L),e.addEventListener("speechstart",P),e.addEventListener("speechend",A),e.addEventListener("result",D),e.addEventListener("error",I),e.addEventListener("nomatch",N),e.start()}catch(e){I(e)}}()}}))};return b.propTypes={timeout:t.number,ariaLabel:t.string,tabIndex:t.number,style:t.object,className:t.string,onStart:t.func,onEnd:t.func,onSpeechStart:t.func,onSpeechEnd:t.func,onResult:t.func,onError:t.func,onNoMatch:t.func},b.defaultProps={timeout:3e3,ariaLabel:"speech",tabIndex:-1,style:null,className:null,onStart:null,onEnd:null,onSpeechStart:null,onSpeechEnd:null,onResult:null,onError:null,onNoMatch:null},b}));
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXgudW1kLmpzIiwic291cmNlcyI6WyIuLi9ub2RlX21vZHVsZXMvQHVudGVtcHMvdXNlci1tZWRpYS11dGlscy9kaXN0L2luZGV4LmVzLmpzIiwiLi4vc3JjL1NwZWVjaFJlY29nbml0aW9uV3JhcHBlci5qcyIsIi4uL3NyYy9NaWNyb3Bob25lSWNvbi5qcyIsIi4uL3NyYy9Wb2NhbC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJmdW5jdGlvbiBlKGUscix0LG4sYSxvLGkpe3RyeXt2YXIgdT1lW29dKGkpLGM9dS52YWx1ZX1jYXRjaChlKXtyZXR1cm4gdm9pZCB0KGUpfXUuZG9uZT9yKGMpOlByb21pc2UucmVzb2x2ZShjKS50aGVuKG4sYSl9ZnVuY3Rpb24gcihyKXtyZXR1cm4gZnVuY3Rpb24oKXt2YXIgdD10aGlzLG49YXJndW1lbnRzO3JldHVybiBuZXcgUHJvbWlzZSgoZnVuY3Rpb24oYSxvKXt2YXIgaT1yLmFwcGx5KHQsbik7ZnVuY3Rpb24gdShyKXtlKGksYSxvLHUsYyxcIm5leHRcIixyKX1mdW5jdGlvbiBjKHIpe2UoaSxhLG8sdSxjLFwidGhyb3dcIixyKX11KHZvaWQgMCl9KSl9fWZ1bmN0aW9uIHQoZSxyKXtyZXR1cm4gZnVuY3Rpb24oZSl7aWYoQXJyYXkuaXNBcnJheShlKSlyZXR1cm4gZX0oZSl8fGZ1bmN0aW9uKGUscil7aWYoXCJ1bmRlZmluZWRcIj09dHlwZW9mIFN5bWJvbHx8IShTeW1ib2wuaXRlcmF0b3IgaW4gT2JqZWN0KGU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5CM0MsVUFBVzBDLEVBQVVFLE9BRXJCM0MsU0FBVXlDLEVBQVVDLE9BRXBCekMsTUFBT3dDLEVBQVVHLE9BRWpCMUMsVUFBV3VDLEVBQVVFLE9BRXJCeEMsUUFBU3NDLEVBQVVJLEtBRW5CekMsTUFBT3FDLEVBQVVJLEtBRWpCeEMsY0FBZW9DLEVBQVVJLEtBRXpCdkMsWUFBYW1DLEVBQVVJLEtBRXZCdEMsU0FBVWtDLEVBQVVJLEtBRXBCckMsUUFBU2lDLEVBQVVJLEtBRW5CcEMsVUFBV2dDLEVBQVVJLE1BR3RCakQsRUFBTWtELGFBQWUsQ0FDcEJoRCxRQUFTLElBQ1RDLFVBQVcsU0FDWEMsVUFBVyxFQUNYQyxNQUFPLEtBQ1BDLFVBQVcsS0FDWEMsUUFBUyxLQUNUQyxNQUFPLEtBQ1BDLGNBQWUsS0FDZkMsWUFBYSxLQUNiQyxTQUFVLEtBQ1ZDLFFBQVMsS0FDVEMsVUFBVyJ9
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],t):(e=e||self)["react-vocal"]=t(e.React,e.PropTypes)}(this,(function(e,t){"use strict";var n="default"in e?e.default:e;function r(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){f(i,r,o,a,c,"next",e)}function c(e){f(i,r,o,a,c,"throw",e)}a(void 0)}))}}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var h=function(){var e=p(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=p(regeneratorRuntime.mark((function e(n,r){var o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.permissions){e.next=4;break}r(new DOMException("NOT_FOUND_ERR","NotFoundError")),e.next=22;break;case 4:return e.prev=4,e.next=7,navigator.permissions.query({name:t});case 7:o=e.sent,e.t0=o.state,e.next="denied"===e.t0?11:"prompt"===e.t0?13:16;break;case 11:return r(new DOMException("NOT_ALLOWED_ERR","NotAllowedError")),e.abrupt("break",17);case 13:return i=function e(t){o.removeEventListener("change",e),"denied"===t.target.state?r(new DOMException("NOT_ALLOWED_ERR","NotAllowedError")):n(t.target.state)},o.addEventListener("change",i),e.abrupt("break",17);case 16:n(o.state);case 17:e.next=22;break;case 19:e.prev=19,e.t1=e.catch(4),r(e.t1);case 22:case"end":return e.stop()}}),e,null,[[4,19]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=p(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=p(regeneratorRuntime.mark((function e(r,o){var i,a,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.mediaDevices){e.next=4;break}o(new DOMException("NOT_FOUND_ERR","NotFoundError")),e.next=24;break;case 4:return e.prev=4,e.t0=Promise,e.next=8,h(t);case 8:return e.t1=e.sent,e.next=11,navigator.mediaDevices.getUserMedia(n);case 11:return e.t2=e.sent,e.t3=[e.t1,e.t2],e.next=15,e.t0.all.call(e.t0,e.t3);case 15:i=e.sent,a=v(i,2),c=a[1],r(c),e.next=24;break;case 21:e.prev=21,e.t4=e.catch(4),o(e.t4);case 24:case"end":return e.stop()}}),e,null,[[4,21]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),y=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"_instance",null),a(this,"_listeners",null),a(this,"_includesEventType",(function(t){return Object.values(e.eventTypes).find((function(e){return e===t}))}));var r=window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition||{};this._instance=new r,this._listeners={},Object.entries(u(u({},e.defaultOptions),t||{})).forEach((function(e){var t=s(e,2),r=t[0],o=t[1];return n._instance[r]=o}))}var t,n;return i(e,null,[{key:"isSupported",get:function(){return!!(window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition)},set:function(e){throw new Error("You cannot set isSupported directly.")}}]),i(e,[{key:"start",value:(t=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._instance){e.next=14;break}return e.prev=1,e.next=4,m("microphone",{audio:!0});case 4:if(e.sent){e.next=7;break}throw new Error("Unable to retrieve the stream from media device");case 7:this._instance.start(),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(1),(t=this._listeners.error)&&t(e.t0);case 14:return e.abrupt("return",this);case 15:case"end":return e.stop()}}),e,this,[[1,10]])})),n=function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function c(e){r(a,o,i,c,u,"next",e)}function u(e){r(a,o,i,c,u,"throw",e)}c(void 0)}))},function(){return n.apply(this,arguments)})},{key:"stop",value:function(){return this._instance&&this._instance.stop(),this}},{key:"abort",value:function(){return this._instance&&this._instance.abort(),this}},{key:"addEventListener",value:function(t,n){var r=this;if(this._instance&&this._includesEventType(t)){this._listeners[t]&&this.removeEventListener(t);var o=function(o){var i=[];t===e.eventTypes.RESULT&&o.results&&o.results.length>0&&i.push(o.results[0][0].transcript),n&&n.apply(r,[].concat(i,[o]))};this._instance.addEventListener(t,(function(e){return o(e)})),this._listeners[t]=o}return this}},{key:"removeEventListener",value:function(e){var t=this._listeners[e];return this._instance.removeEventListener(e,t),delete this._listeners[e],this}},{key:"cleanup",value:function(){var e=this;return this.stop(),Object.keys(this._listeners).forEach((function(t){return e.removeEventListener(t)})),this._instance=null,this}},{key:"instance",get:function(){return this._instance},set:function(e){throw new Error("You cannot set instance directly.")}}]),e}();a(y,"defaultOptions",{lang:"fr-FR",continuous:!1,interimResults:!1,maxAlternatives:1}),a(y,"eventTypes",{AUDIO_END:"audioend",AUDIO_START:"audiostart",END:"end",ERROR:"error",NO_MATCH:"nomatch",RESULT:"result",SOUND_END:"soundend",SOUND_START:"soundstart",SPEECH_END:"speechend",SPEECH_START:"speechstart",START:"start"});var b=function(e){var t=e.iconColor,r=void 0===t?"black":t,o=e.activeColor,i=void 0===o?"red":o,a=e.isActive,c=void 0!==a&&a;return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24"},n.createElement("g",null,n.createElement("path",{fill:r,d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"}),c&&n.createElement("circle",{fill:i,cx:"16",cy:"4",r:"4"})))},E=function(t){var r=t.children,o=t.timeout,i=t.ariaLabel,a=t.tabIndex,c=t.style,l=t.className,f=t.onStart,p=t.onEnd,v=t.onSpeechStart,d=t.onSpeechEnd,h=t.onResult,m=t.onError,E=t.onNoMatch,w=t.__recognitionInstance,g=e.useRef(null),S=e.useRef(null),O=s(e.useState(!1),2),_=O[0],R=O[1];e.useEffect((function(){if(y.isSupported)return S.current=w||new y,function(){S.current.abort(),S.current.cleanup(),clearTimeout(g.current)}}),[w]);var x=function(){g.current=setTimeout(j,o)},k=function(){clearTimeout(g.current),g.current=null},L=function(){try{R(!1);var e=S.current;e.removeEventListener("start",T),e.removeEventListener("end",j),e.removeEventListener("speechstart",A),e.removeEventListener("speechend",N),e.removeEventListener("result",D),e.removeEventListener("error",P),e.removeEventListener("nomatch",I),e.stop()}catch(e){m&&m(e)}},T=function(e){x(),f&&f(e)},j=function(e){k(),L(),p&&p(e)},A=function(e){k(),v&&v(e)},N=function(e){x(),d&&d(e)},D=function(e,t){L(),h&&h(e,t)},P=function(e){L(),m&&m(e)},I=function(e){E&&E(e)};return y.isSupported&&e.cloneElement(e.isValidElement(r)?r:n.createElement("div",{"data-testid":"__vocal-root__",role:"button","aria-label":i,tabIndex:a,style:l?null:u({width:24,height:24,cursor:_?null:"pointer"},c),className:l},n.createElement(b,{isActive:_,iconColor:"#aaa"})),u({},!_&&{onClick:function(){!function(){try{R(!0);var e=S.current;e.addEventListener("start",T),e.addEventListener("end",j),e.addEventListener("speechstart",A),e.addEventListener("speechend",N),e.addEventListener("result",D),e.addEventListener("error",P),e.addEventListener("nomatch",I),e.start()}catch(e){P(e)}}()}}))};return E.propTypes={timeout:t.number,ariaLabel:t.string,tabIndex:t.number,style:t.object,className:t.string,onStart:t.func,onEnd:t.func,onSpeechStart:t.func,onSpeechEnd:t.func,onResult:t.func,onError:t.func,onNoMatch:t.func},E.defaultProps={timeout:3e3,ariaLabel:"speech",tabIndex:-1,style:null,className:null,onStart:null,onEnd:null,onSpeechStart:null,onSpeechEnd:null,onResult:null,onError:null,onNoMatch:null},E}));
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXgudW1kLmpzIiwic291cmNlcyI6WyIuLi9ub2RlX21vZHVsZXMvQHVudGVtcHMvdXNlci1wZXJtaXNzaW9ucy11dGlscy9kaXN0L2luZGV4LmVzLmpzIiwiLi4vc3JjL1NwZWVjaFJlY29nbml0aW9uV3JhcHBlci5qcyIsIi4uL3NyYy9NaWNyb3Bob25lSWNvbi5qcyIsIi4uL3NyYy9Wb2NhbC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJmdW5jdGlvbiBlKGUscix0LG4sYSxvLGkpe3RyeXt2YXIgdT1lW29dKGkpLGM9dS52YWx1ZX1jYXRjaChlKXtyZXR1cm4gdm9pZCB0KGUpfXUuZG9uZT9yKGMpOlByb21pc2UucmVzb2x2ZShjKS50aGVuKG4sYSl9ZnVuY3Rpb24gcihyKXtyZXR1cm4gZnVuY3Rpb24oKXt2YXIgdD10aGlzLG49YXJndW1lbnRzO3JldHVybiBuZXcgUHJvbWlzZSgoZnVuY3Rpb24oYSxvKXt2YXIgaT1yLmFwcGx5KHQsbik7ZnVuY3Rpb24gdShyKXtlKGksYSxvLHUsYyxcIm5leHRcIixyKX1mdW5jdGlvbiBjKHIpe2UoaSxhLG8sdSxjLFwidGhyb3dcIixyKX11KHZvaWQgMCl9KSl9fWZ1bmN0aW9uIHQoZSxyKXtyZXR1cm4gZnVuY3Rpb24oZSl7aWYoQXJyYXkuaXNBcnJheShlKSlyZXR1cm4gZX0oZSl8fGZ1bmN0aW9uKGUscil7aWYoXCJ1bmRlZmluZWRcIj09dHlwZW9mIFN5bWJvbHx8IShTeW1ib2wuaXRlc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"name": "@untemps/react-vocal",
"version": "1.0.1",
"version": "1.0.2",
"author": "Vincent Le Badezet <v.lebadezet@untemps.net>",

@@ -38,3 +38,3 @@ "repository": "git@github.com:untemps/react-vocal.git",

"@untemps/event-dispatcher": "^1.1.0",
"@untemps/user-media-utils": "^1.0.3",
"@untemps/user-permissions-utils": "^1.0.0",
"babel-jest": "^26.0.1",

@@ -62,5 +62,4 @@ "cross-env": "^7.0.2",

},
"testPathIgnorePatterns": [
".+Mock.js"
]
"coverageDirectory": "./coverage/",
"collectCoverage": true
},

@@ -86,3 +85,3 @@ "husky": {

"test": "jest -u --watch",
"test:ci": "CI=true jest -u -b",
"test:ci": "CI=true jest -u -b --coverage",
"build": "rm -rf dist && yarn build:cjs && yarn build:es && yarn build:umd",

@@ -89,0 +88,0 @@ "build:cjs": "cross-env NODE_ENV=production BABEL_ENV=cjs rollup -c",

@@ -5,3 +5,5 @@ # @untemps/react-vocal

![.github/workflows/index.yml](https://github.com/untemps/react-vocal/workflows/.github/workflows/index.yml/badge.svg?branch=master)
![npm](https://img.shields.io/npm/v/@untemps/react-vocal?style=for-the-badge)
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/untemps/react-vocal/deploy?style=for-the-badge)
![Codecov](https://img.shields.io/codecov/c/github/untemps/react-vocal?style=for-the-badge)

@@ -8,0 +10,0 @@ ## Disclaimer

@@ -6,6 +6,2 @@ import React from 'react'

import SpeechRecognitionMock from './SpeechRecognitionMock'
import NavigatorPermissionsMock from './NavigatorPermissionsMock'
import NavigatorMediaDevicesMock from './NavigatorMediaDevicesMock'
import SpeechRecognitionWrapper from '../SpeechRecognitionWrapper'

@@ -25,11 +21,57 @@ import Vocal from '../Vocal'

SpeechRecognitionMock.mock()
NavigatorPermissionsMock.mock('granted')
NavigatorMediaDevicesMock.mock('foo')
global.PermissionStatus = jest.fn(() => ({
state: 'granted',
addEventListener: jest.fn(),
}))
const status = new PermissionStatus()
global.Permissions = jest.fn(() => ({
query: jest.fn().mockResolvedValue(status),
}))
global.navigator.permissions = new Permissions()
global.MediaDevices = jest.fn(() => ({
getUserMedia: jest.fn().mockResolvedValue('foo'),
}))
global.navigator.mediaDevices = new MediaDevices()
global.SpeechRecognition = jest.fn(() => {
const handlers = {}
return {
addEventListener: jest.fn((type, callback) => {
handlers[type] = callback
}),
removeEventListener: jest.fn(),
dispatchEvent: jest.fn(),
start: jest.fn(() => {
!!handlers.start && handlers.start()
}),
stop: jest.fn(() => {
!!handlers.end && handlers.end()
}),
abort: jest.fn(() => {
!!handlers.end && handlers.end()
}),
say: jest.fn((sentence) => {
!!handlers.speechstart && handlers.speechstart()
const resultEvent = new Event('result')
resultEvent.resultIndex = 0
resultEvent.results = [
[
{
transcript: sentence,
},
],
]
!!handlers.result && handlers.result(resultEvent)
!!handlers.speechend && handlers.speechend()
}),
}
})
})
afterAll(() => {
SpeechRecognitionMock.unmock()
NavigatorPermissionsMock.unmock()
NavigatorMediaDevicesMock.unmock()
global.PermissionStatus.mockReset()
global.Permissions.mockReset()
global.MediaDevices.mockReset()
global.SpeechRecognition.mockReset()
})

@@ -65,9 +107,16 @@

const recognition = new SpeechRecognitionWrapper()
const { queryByTestId } = render(getInstance({ __recognitionInstance: recognition, onResult }))
const { getByTestId } = render(getInstance({ __recognitionInstance: recognition, onResult }))
let flag = false
recognition.addEventListener('start', async () => {
flag = true
})
await act(async () => {
recognition.instance.addEventListener('start', async () => {
recognition.instance.say('Foo')
await waitFor(() => expect(onResult).toHaveBeenCalledWith('Foo', expect.anything()))
})
fireEvent.click(queryByTestId('__vocal-root__'))
fireEvent.click(getByTestId('__vocal-root__'))
await waitFor(() => flag)
recognition.instance.say('Foo')
await waitFor(() => expect(onResult).toHaveBeenCalledWith('Foo', expect.anything()))
})

@@ -79,9 +128,16 @@ })

const recognition = new SpeechRecognitionWrapper()
const { queryByTestId } = render(getInstance({ __recognitionInstance: recognition, onSpeechStart }))
const { getByTestId } = render(getInstance({ __recognitionInstance: recognition, onSpeechStart }))
let flag = false
recognition.addEventListener('start', async () => {
flag = true
})
await act(async () => {
recognition.instance.addEventListener('start', async () => {
recognition.instance.say('Foo')
await waitFor(() => expect(onSpeechStart).toHaveBeenCalled())
})
fireEvent.click(queryByTestId('__vocal-root__'))
fireEvent.click(getByTestId('__vocal-root__'))
await waitFor(() => flag)
recognition.instance.say('Foo')
await waitFor(() => expect(onSpeechStart).toHaveBeenCalled())
})

@@ -93,9 +149,16 @@ })

const recognition = new SpeechRecognitionWrapper()
const { queryByTestId } = render(getInstance({ __recognitionInstance: recognition, onSpeechEnd }))
const { getByTestId } = render(getInstance({ __recognitionInstance: recognition, onSpeechEnd }))
let flag = false
recognition.addEventListener('start', async () => {
flag = true
})
await act(async () => {
recognition.instance.addEventListener('start', async () => {
recognition.instance.say('Foo')
await waitFor(() => expect(onSpeechEnd).toHaveBeenCalled())
})
fireEvent.click(queryByTestId('__vocal-root__'))
fireEvent.click(getByTestId('__vocal-root__'))
await waitFor(() => flag)
recognition.instance.say('Foo')
await waitFor(() => expect(onSpeechEnd).toHaveBeenCalled())
})

@@ -107,6 +170,6 @@ })

const onEnd = jest.fn()
const { queryByTestId } = render(getInstance({ timeout, onEnd }))
const { getByTestId } = render(getInstance({ timeout, onEnd }))
await act(async () => {
fireEvent.click(queryByTestId('__vocal-root__'))
await waitFor(() => expect(onEnd).toHaveBeenCalled(), { timeout: 200 })
fireEvent.click(getByTestId('__vocal-root__'))
await waitFor(() => expect(onEnd).toHaveBeenCalled(), { timeout: timeout * 2 })
})

@@ -118,11 +181,18 @@ })

const recognition = new SpeechRecognitionWrapper()
const { queryByTestId } = render(getInstance({ __recognitionInstance: recognition, onEnd }))
const { getByTestId } = render(getInstance({ __recognitionInstance: recognition, onEnd }))
let flag = false
recognition.addEventListener('start', async () => {
flag = true
})
await act(async () => {
fireEvent.click(queryByTestId('__vocal-root__'))
recognition.instance.addEventListener('start', async () => {
recognition.instance.say('Foo')
await waitFor(() => expect(onEnd).toHaveBeenCalled())
})
fireEvent.click(getByTestId('__vocal-root__'))
await waitFor(() => flag)
recognition.instance.say('Foo')
await waitFor(() => expect(onEnd).toHaveBeenCalled())
})
})
})

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

import { getUserMediaStream } from '@untemps/user-media-utils'
import { getUserMediaStream } from '@untemps/user-permissions-utils'

@@ -3,0 +3,0 @@ class SpeechRecognitionWrapper {

@@ -81,3 +81,3 @@ import React, { cloneElement, isValidElement, useEffect, useRef, useState } from 'react'

} catch (error) {
_onError(error)
!!onError && onError(error)
}

@@ -84,0 +84,0 @@ }

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