@untemps/react-vocal
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -0,1 +1,8 @@ | ||
# [1.3.0](https://github.com/untemps/react-vocal/compare/v1.2.0...v1.3.0) (2020-07-31) | ||
### Features | ||
* Export hook to abstract SpeechRecognition instance creation ([cf36b86](https://github.com/untemps/react-vocal/commit/cf36b862280a3de4ed67afa484afafbdf5613b86)) | ||
# [1.2.0](https://github.com/untemps/react-vocal/compare/v1.1.3...v1.2.0) (2020-07-19) | ||
@@ -2,0 +9,0 @@ |
@@ -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 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,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 m(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 d(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){m(o,r,i,a,c,"next",e)}function c(e){m(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 w=function(){var e=d(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=d(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("Permissions not supported","NOT_FOUND_ERR")),e.next=16;break;case 4:return e.prev=4,e.next=7,navigator.permissions.query({name:t});case 7:i=e.sent,o=function e(t){i.removeEventListener("change",e),g(t.target.state,n,r)},i.addEventListener("change",o),g(i.state,n,r),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(4),r(e.t0);case 16:case"end":return e.stop()}}),e,null,[[4,13]])})));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)}}(),g=function(e,t,n){switch(e){case"denied":n(new DOMException("Permission denied","NOT_ALLOWED_ERR"));break;default:t(e)}},E=function(){var e=d(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=d(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("MediaDevices not supported","NOT_FOUND_ERR")),e.next=24;break;case 4:return e.prev=4,e.t0=Promise,e.next=8,w(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=y(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)}}(),S=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);var r=e._resolveSpeechRecognition()||{};this._instance=new r,this._listeners={},Object.entries(p(p({},e.defaultOptions),t||{})).forEach((function(t){var r=v(t,2),i=r[0],o=r[1];"grammars"!==i||o||(o=new(e._resolveSpeechGrammarList()||{}));n._instance[i]=o}))}var t,n;return u(e,null,[{key:"isSupported",get:function(){return!!e._resolveSpeechRecognition()},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:"_includesEventType",value:function(t){return Object.values(e.eventTypes).find((function(e){return e===t}))}},{key:"instance",get:function(){return this._instance},set:function(e){throw new Error("You cannot set instance directly.")}}],[{key:"_resolveSpeechRecognition",value:function(){return window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition}},{key:"_resolveSpeechGrammarList",value:function(){return window.SpeechGrammarList||window.webkitSpeechGrammarList||window.mozSpeechGrammarList||window.msSpeechGrammarList}}]),e}();l(S,"defaultOptions",{grammars:null,lang:"en-US",continuous:!1,interimResults:!1,maxAlternatives:1,serviceURI:null}),l(S,"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 _=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"})))},O=function(a){var c=a.children,s=a.grammars,u=a.lang,l=a.timeout,f=a.ariaLabel,h=a.tabIndex,m=a.style,d=a.className,y=a.onStart,b=a.onEnd,w=a.onSpeechStart,g=a.onSpeechEnd,E=a.onResult,O=a.onError,R=a.onNoMatch,x=a.__recognitionInstance,L=t(null),k=t(null),j=v(n(!1),2),T=j[0],A=j[1];r((function(){if(S.isSupported)return k.current=x||new S({grammars:s,lang:u}),function(){k.current.abort(),k.current.cleanup(),clearTimeout(L.current)}}),[x,s,u]);var P=function(){L.current=setTimeout(I,l)},D=function(){clearTimeout(L.current),L.current=null},N=function(){try{A(!1);var e=k.current;e.removeEventListener("start",U),e.removeEventListener("end",I),e.removeEventListener("speechstart",M),e.removeEventListener("speechend",C),e.removeEventListener("result",G),e.removeEventListener("error",z),e.removeEventListener("nomatch",H),e.stop()}catch(e){O&&O(e)}},U=function(e){P(),y&&y(e)},I=function(e){D(),N(),b&&b(e)},M=function(e){D(),w&&w(e)},C=function(e){P(),g&&g(e)},G=function(e,t){N(),E&&E(e,t)},z=function(e){N(),O&&O(e)},H=function(e){R&&R(e)};return S.isSupported&&i(o(c)?c:e.createElement("div",{"data-testid":"__vocal-root__",role:"button","aria-label":f,tabIndex:h,style:d?null:p({width:24,height:24,cursor:T?null:"pointer"},m),className:d},e.createElement(_,{isActive:T,iconColor:"#aaa"})),p({},!T&&{onClick:function(){!function(){try{A(!0);var e=k.current;e.addEventListener("start",U),e.addEventListener("end",I),e.addEventListener("speechstart",M),e.addEventListener("speechend",C),e.addEventListener("result",G),e.addEventListener("error",z),e.addEventListener("nomatch",H),e.start()}catch(e){z(e)}}()}}))};O.propTypes={grammars:a.object,lang:a.string,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={grammars:null,lang:"en-US",timeout:3e3,ariaLabel:"speech",tabIndex:-1,style:null,className:null,onStart:null,onEnd:null,onSpeechStart:null,onSpeechEnd:null,onResult:null,onError:null,onNoMatch:null};var R=S.isSupported;export default O;export{R as isSupported}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZXMuanMiLCJzb3VyY2VzIjpbIi4uL25vZGV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9FLFNBQVUsS0FDVkMsS0FBTSxRQUNOOEIsUUFBUyxJQUNUQyxVQUFXLFNBQ1hDLFVBQVcsRUFDWEMsTUFBTyxLQUNQQyxVQUFXLEtBQ1hDLFFBQVMsS0FDVEMsTUFBTyxLQUNQQyxjQUFlLEtBQ2ZDLFlBQWEsS0FDYkMsU0FBVSxLQUNWQyxRQUFTLEtBQ1RDLFVBQVcsVUMxTUNTLEVBQWMvRixFQUF5QitGIn0= | ||
import e,{useRef as t,useEffect as n,useCallback as r,useState as i,cloneElement as o,isValidElement as a}from"react";import c from"prop-types";function u(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 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 l(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(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 h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(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,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 m(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 m(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 m(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),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,i)}function b(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 g(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)?g(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 g(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 w=function(){var e=b(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=b(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("Permissions not supported","NOT_FOUND_ERR")),e.next=16;break;case 4:return e.prev=4,e.next=7,navigator.permissions.query({name:t});case 7:i=e.sent,o=function e(t){i.removeEventListener("change",e),_(t.target.state,n,r)},i.addEventListener("change",o),_(i.state,n,r),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(4),r(e.t0);case 16:case"end":return e.stop()}}),e,null,[[4,13]])})));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)}}(),_=function(e,t,n){switch(e){case"denied":n(new DOMException("Permission denied","NOT_ALLOWED_ERR"));break;default:t(e)}},S=function(){var e=b(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=b(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("MediaDevices not supported","NOT_FOUND_ERR")),e.next=24;break;case 4:return e.prev=4,e.t0=Promise,e.next=8,w(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=y(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)}}(),E=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),f(this,"_instance",null),f(this,"_listeners",null);var r=e._resolveSpeechRecognition()||{};this._instance=new r,this._listeners={},Object.entries(h(h({},e.defaultOptions),t||{})).forEach((function(t){var r=v(t,2),i=r[0],o=r[1];"grammars"!==i||o||(o=new(e._resolveSpeechGrammarList()||{}));n._instance[i]=o}))}var t,n;return l(e,null,[{key:"isSupported",get:function(){return!!e._resolveSpeechRecognition()},set:function(e){throw new Error("You cannot set isSupported directly.")}}]),l(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,S("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){u(o,r,i,a,c,"next",e)}function c(e){u(o,r,i,a,c,"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:"_includesEventType",value:function(t){return Object.values(e.eventTypes).find((function(e){return e===t}))}},{key:"instance",get:function(){return this._instance},set:function(e){throw new Error("You cannot set instance directly.")}}],[{key:"_resolveSpeechRecognition",value:function(){return window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition}},{key:"_resolveSpeechGrammarList",value:function(){return window.SpeechGrammarList||window.webkitSpeechGrammarList||window.mozSpeechGrammarList||window.msSpeechGrammarList}}]),e}();f(E,"defaultOptions",{grammars:null,lang:"en-US",continuous:!1,interimResults:!1,maxAlternatives:1,serviceURI:null}),f(E,"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 O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=t(null);n((function(){if(E.isSupported)return a.current=o||new E({lang:e,grammars:i}),function(){a.current.abort(),a.current.cleanup()}}),[e,i,o]);var c=r((function(){a.current&&a.current.start()}),[]),u=r((function(){a.current&&a.current.stop()}),[]),s=r((function(){a.current&&a.current.abort()}),[]),l=r((function(e,t){a.current&&a.current.addEventListener(e,t)}),[]),f=r((function(e,t){a.current&&a.current.removeEventListener(e,t)}),[]),p=r((function(){a.current&&a.current.cleanup()}),[]);return[a,{start:c,stop:u,abort:s,subscribe:l,unsubscribe:f,clean:p}]},R=function(t){var n=t.color,r=t.activeColor,i=t.isActive;return e.createElement("svg",{"data-testid":"__icon-root__",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24"},e.createElement("g",null,e.createElement("path",{"data-testid":"__icon-path__",fill:n,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"}),i&&e.createElement("circle",{"data-testid":"__icon-active__",fill:r,cx:"16",cy:"4",r:"4"})))};R.propTypes={color:c.string,activeColor:c.string,isActive:c.bool},R.defaultProps={color:"black",activeColor:"red",isActive:!1};var x=function(c){var u=c.children,s=c.lang,l=c.grammars,f=c.timeout,p=c.ariaLabel,m=c.tabIndex,d=c.style,b=c.className,y=c.onStart,g=c.onEnd,w=c.onSpeechStart,_=c.onSpeechEnd,S=c.onResult,x=c.onError,k=c.onNoMatch,j=c.__rsInstance,T=v(i(!1),2),A=T[0],L=T[1],P=v(O(s,l,j),2)[1],D=P.start,N=P.stop,U=P.subscribe,I=P.unsubscribe,M=v(function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=t(-1),a=r((function(){clearTimeout(o.current),o.current=-1}),[]),c=r((function(){a(),o.current=setTimeout(e,i)}),[e,i,a]);return n((function(){return a}),[a]),[c,a]}((function(){return F()}),f),2),C=M[0],G=M[1],z=function(){try{L(!1),I("start",H),I("end",F),I("speechstart",Y),I("speechend",$),I("result",q),I("error",B),I("nomatch",V),N()}catch(e){x&&x(e)}},H=function(e){C(),y&&y(e)},F=function(e){G(),z(),g&&g(e)},Y=function(e){G(),w&&w(e)},$=function(e){C(),_&&_(e)},q=function(e,t){z(),S&&S(e,t)},B=function(e){z(),x&&x(e)},V=function(e){k&&k(e)};return E.isSupported&&o(a(u)?u:e.createElement("div",{"data-testid":"__vocal-root__",role:"button","aria-label":p,tabIndex:m,style:b?null:h({width:24,height:24,cursor:A?null:"pointer"},d),className:b},e.createElement(R,{isActive:A,iconColor:"#aaa"})),h({},!A&&{onClick:function(){!function(){try{L(!0),U("start",H),U("end",F),U("speechstart",Y),U("speechend",$),U("result",q),U("error",B),U("nomatch",V),D()}catch(e){B(e)}}()}}))};x.propTypes={lang:c.string,grammars:c.object,timeout:c.number,ariaLabel:c.string,tabIndex:c.number,style:c.object,className:c.string,onStart:c.func,onEnd:c.func,onSpeechStart:c.func,onSpeechEnd:c.func,onResult:c.func,onError:c.func,onNoMatch:c.func},x.defaultProps={lang:"en-US",grammars:null,timeout:3e3,ariaLabel:"speech",tabIndex:-1,style:null,className:null,onStart:null,onEnd:null,onSpeechStart:null,onSpeechEnd:null,onResult:null,onError:null,onNoMatch:null};var k=E.isSupported;export default x;export{k as isSupported,O as useVocal}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZXMuanMiLCJzb3VyY2VzIjpbIi4uL25vZGVfbW9kdWxlcy9AdW50ZW1wcy91c2VyLXBlcm1pc3Npb25zLXV0aWxzL2Rpc3QvaW5kZXguZXMuanMiLCIuLi9zcmMvY29yZS9TcGVlY2hSZWNvZ25pdGlvbldyYXBwZXIuanMiLCIuLi9zcmMvaG9va3MvdXNlVm9jYWwuanMiLCIuLi9zcmMvY29tcG9uZW50cy9JY29uLmpzIiwiLi4vc3JjL2NvbXBvbmVudHMvVm9jYWwuanMiLCIuLi9zcmMvaG9va3MvdXNlVGltZW91dC5qcyIsIi4uL3NyYy9pbmRleC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJmdW5jdGlvbiBlKGUscix0LG4sYSxpLG8pe3RyeXt2YXIgdT1lW2ldKG8pLGM9dS52YWx1ZX1jYXRjaChlKXtyZXR1cm4gdm9pZCB0KGUpfXUuZG9uZT9yKGMpOlByb21pc2UucmVzb2x2ZShjKS50aGVuKG4sYSl9ZnVuY3Rpb24gcihyKXtyZXR1cm4gZnVuY3Rpb24oKXt2YXIgdD10aGlzLG49YXJndW1lbnRzO3JldHVybiBuZXcgUHJvbWlzZSgoZnVuY3Rpb24oYSxpKXt2YXIgbz1yLmFwcGx5KHQsbik7ZnVuY3Rpb24gdShyKXtlKG8sYSxpLHUsYyxcI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U15QyxFQUFVQyxPQUVoQjNDLFNBQVUwQyxFQUFVMEMsT0FFcEJwQyxRQUFTTixFQUFVMkMsT0FFbkJwQyxVQUFXUCxFQUFVQyxPQUVyQk8sU0FBVVIsRUFBVTJDLE9BRXBCbEMsTUFBT1QsRUFBVTBDLE9BRWpCaEMsVUFBV1YsRUFBVUMsT0FFckJVLFFBQVNYLEVBQVU0QyxLQUVuQmhDLE1BQU9aLEVBQVU0QyxLQUVqQi9CLGNBQWViLEVBQVU0QyxLQUV6QjlCLFlBQWFkLEVBQVU0QyxLQUV2QjdCLFNBQVVmLEVBQVU0QyxLQUVwQjVCLFFBQVNoQixFQUFVNEMsS0FFbkIzQixVQUFXakIsRUFBVTRDLE1BR3RCeEMsRUFBTUQsYUFBZSxDQUNwQjVDLEtBQU0sUUFDTkQsU0FBVSxLQUNWZ0QsUUFBUyxJQUNUQyxVQUFXLFNBQ1hDLFVBQVcsRUFDWEMsTUFBTyxLQUNQQyxVQUFXLEtBQ1hDLFFBQVMsS0FDVEMsTUFBTyxLQUNQQyxjQUFlLEtBQ2ZDLFlBQWEsS0FDYkMsU0FBVSxLQUNWQyxRQUFTLEtBQ1RDLFVBQVcsVUU5S0N0QyxFQUFjakUsRUFBeUJpRSJ9 |
@@ -1,2 +0,2 @@ | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=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 p(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 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("Permissions not supported","NOT_FOUND_ERR")),e.next=16;break;case 4:return e.prev=4,e.next=7,navigator.permissions.query({name:t});case 7:i=e.sent,o=function e(t){i.removeEventListener("change",e),y(t.target.state,n,r)},i.addEventListener("change",o),y(i.state,n,r),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(4),r(e.t0);case 16:case"end":return e.stop()}}),e,null,[[4,13]])})));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(e,t,n){switch(e){case"denied":n(new DOMException("Permission denied","NOT_ALLOWED_ERR"));break;default:t(e)}},b=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("MediaDevices not supported","NOT_FOUND_ERR")),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)}}(),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),c(this,"_instance",null),c(this,"_listeners",null);var r=e._resolveSpeechRecognition()||{};this._instance=new r,this._listeners={},Object.entries(u(u({},e.defaultOptions),t||{})).forEach((function(t){var r=l(t,2),i=r[0],o=r[1];"grammars"!==i||o||(o=new(e._resolveSpeechGrammarList()||{}));n._instance[i]=o}))}var t,n;return a(e,null,[{key:"isSupported",get:function(){return!!e._resolveSpeechRecognition()},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,b("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:"_includesEventType",value:function(t){return Object.values(e.eventTypes).find((function(e){return e===t}))}},{key:"instance",get:function(){return this._instance},set:function(e){throw new Error("You cannot set instance directly.")}}],[{key:"_resolveSpeechRecognition",value:function(){return window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition}},{key:"_resolveSpeechGrammarList",value:function(){return window.SpeechGrammarList||window.webkitSpeechGrammarList||window.mozSpeechGrammarList||window.msSpeechGrammarList}}]),e}();c(w,"defaultOptions",{grammars:null,lang:"en-US",continuous:!1,interimResults:!1,maxAlternatives:1,serviceURI:null}),c(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 g=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.grammars,o=e.lang,a=e.timeout,c=e.ariaLabel,s=e.tabIndex,f=e.style,p=e.className,v=e.onStart,h=e.onEnd,d=e.onSpeechStart,m=e.onSpeechEnd,y=e.onResult,b=e.onError,E=e.onNoMatch,S=e.__recognitionInstance,_=t.useRef(null),O=t.useRef(null),R=l(t.useState(!1),2),x=R[0],L=R[1];t.useEffect((function(){if(w.isSupported)return O.current=S||new w({grammars:i,lang:o}),function(){O.current.abort(),O.current.cleanup(),clearTimeout(_.current)}}),[S,i,o]);var k=function(){_.current=setTimeout(P,a)},j=function(){clearTimeout(_.current),_.current=null},T=function(){try{L(!1);var e=O.current;e.removeEventListener("start",A),e.removeEventListener("end",P),e.removeEventListener("speechstart",D),e.removeEventListener("speechend",N),e.removeEventListener("result",U),e.removeEventListener("error",I),e.removeEventListener("nomatch",M),e.stop()}catch(e){b&&b(e)}},A=function(e){k(),v&&v(e)},P=function(e){j(),T(),h&&h(e)},D=function(e){j(),d&&d(e)},N=function(e){k(),m&&m(e)},U=function(e,t){T(),y&&y(e,t)},I=function(e){T(),b&&b(e)},M=function(e){E&&E(e)};return w.isSupported&&t.cloneElement(t.isValidElement(r)?r:n.createElement("div",{"data-testid":"__vocal-root__",role:"button","aria-label":c,tabIndex:s,style:p?null:u({width:24,height:24,cursor:x?null:"pointer"},f),className:p},n.createElement(g,{isActive:x,iconColor:"#aaa"})),u({},!x&&{onClick:function(){!function(){try{L(!0);var e=O.current;e.addEventListener("start",A),e.addEventListener("end",P),e.addEventListener("speechstart",D),e.addEventListener("speechend",N),e.addEventListener("result",U),e.addEventListener("error",I),e.addEventListener("nomatch",M),e.start()}catch(e){I(e)}}()}}))};E.propTypes={grammars:r.object,lang:r.string,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={grammars:null,lang:"en-US",timeout:3e3,ariaLabel:"speech",tabIndex:-1,style:null,className:null,onStart:null,onEnd:null,onSpeechStart:null,onSpeechEnd:null,onResult:null,onError:null,onNoMatch:null};var S=w.isSupported;exports.default=E,exports.isSupported=S; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbIi4uL25vZGVfbW9kdWxlcy9AdW50ZW1wcy91c2VyLXBlcm1pc3Npb25zLXV0aWxzL2Rpc3QvaW5kZXguZXMuanMiLCIuLi9zcmMvU3BlZWNoUmVjb2duaXRpb25XcmFwcGVyLmpzIiwiLi4vc3JjL01pY3JvcGhvbmVJY29uLmpzIiwiLi4vc3JjL1ZvY2FsLmpzIiwiLi4vc3JjL2luZGV4LmpzIl0sInNvdXJjZXNDb250ZW50IjpbImZ1bmN0aW9uIGUoZSxyLHQsbixhLGksbyl7dHJ5e3ZhciB1PWVbaV0obyksYz11LnZhbHVlfWNhdGNoKGUpe3JldHVybiB2b2lkIHQoZSl9dS5kb25lP3IoYyk6UHJvbWlzZS5yZXNvbHZlKGMpLnRoZW4obixhKX1mdW5jdGlvbiByKHIpe3JldHVybiBmdW5jdGlvbigpe3ZhciB0PXRoaXMsbj1hcmd1bWVudHM7cmV0dXJuIG5ldyBQcm9taXNlKChmdW5jdGlvbihhLGkpe3ZhciBvPXIuYXBwbHkodCxuKTtmdW5jdGlvbiB1KHIpe2UobyxhLGksdSxjLFwibmV4dFwiLHIpfWZ1bmN0aW9uIGMocil7ZShv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VBQU00QyxVQUFZLENBRWpCekUsU0FBVTBFLEVBQVVDLE9BRXBCMUUsS0FBTXlFLEVBQVVFLE9BRWhCN0MsUUFBUzJDLEVBQVVHLE9BRW5CN0MsVUFBVzBDLEVBQVVFLE9BRXJCM0MsU0FBVXlDLEVBQVVHLE9BRXBCM0MsTUFBT3dDLEVBQVVDLE9BRWpCeEMsVUFBV3VDLEVBQVVFLE9BRXJCeEMsUUFBU3NDLEVBQVVJLEtBRW5CekMsTUFBT3FDLEVBQVVJLEtBRWpCeEMsY0FBZW9DLEVBQVVJLEtBRXpCdkMsWUFBYW1DLEVBQVVJLEtBRXZCdEMsU0FBVWtDLEVBQVVJLEtBRXBCckMsUUFBU2lDLEVBQVVJLEtBRW5CcEMsVUFBV2dDLEVBQVVJLE1BR3RCakQsRUFBTWtELGFBQWUsQ0FDcEIvRSxTQUFVLEtBQ1ZDLEtBQU0sUUFDTjhCLFFBQVMsSUFDVEMsVUFBVyxTQUNYQyxVQUFXLEVBQ1hDLE1BQU8sS0FDUEMsVUFBVyxLQUNYQyxRQUFTLEtBQ1RDLE1BQU8sS0FDUEMsY0FBZSxLQUNmQyxZQUFhLEtBQ2JDLFNBQVUsS0FDVkMsUUFBUyxLQUNUQyxVQUFXLFVDMU1DUyxFQUFjL0YsRUFBeUIrRiJ9 | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});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("Permissions not supported","NOT_FOUND_ERR")),e.next=16;break;case 4:return e.prev=4,e.next=7,navigator.permissions.query({name:t});case 7:i=e.sent,o=function e(t){i.removeEventListener("change",e),b(t.target.state,n,r)},i.addEventListener("change",o),b(i.state,n,r),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(4),r(e.t0);case 16:case"end":return e.stop()}}),e,null,[[4,13]])})));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)}}(),b=function(e,t,n){switch(e){case"denied":n(new DOMException("Permission denied","NOT_ALLOWED_ERR"));break;default:t(e)}},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("MediaDevices not supported","NOT_FOUND_ERR")),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)}}(),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),c(this,"_instance",null),c(this,"_listeners",null);var r=e._resolveSpeechRecognition()||{};this._instance=new r,this._listeners={},Object.entries(s(s({},e.defaultOptions),t||{})).forEach((function(t){var r=l(t,2),i=r[0],o=r[1];"grammars"!==i||o||(o=new(e._resolveSpeechGrammarList()||{}));n._instance[i]=o}))}var t,n;return a(e,null,[{key:"isSupported",get:function(){return!!e._resolveSpeechRecognition()},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:"_includesEventType",value:function(t){return Object.values(e.eventTypes).find((function(e){return e===t}))}},{key:"instance",get:function(){return this._instance},set:function(e){throw new Error("You cannot set instance directly.")}}],[{key:"_resolveSpeechRecognition",value:function(){return window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition}},{key:"_resolveSpeechGrammarList",value:function(){return window.SpeechGrammarList||window.webkitSpeechGrammarList||window.mozSpeechGrammarList||window.msSpeechGrammarList}}]),e}();c(g,"defaultOptions",{grammars:null,lang:"en-US",continuous:!1,interimResults:!1,maxAlternatives:1,serviceURI:null}),c(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 w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=t.useRef(null);t.useEffect((function(){if(g.isSupported)return i.current=r||new g({lang:e,grammars:n}),function(){i.current.abort(),i.current.cleanup()}}),[e,n,r]);var o=t.useCallback((function(){i.current&&i.current.start()}),[]),a=t.useCallback((function(){i.current&&i.current.stop()}),[]),c=t.useCallback((function(){i.current&&i.current.abort()}),[]),u=t.useCallback((function(e,t){i.current&&i.current.addEventListener(e,t)}),[]),s=t.useCallback((function(e,t){i.current&&i.current.removeEventListener(e,t)}),[]),l=t.useCallback((function(){i.current&&i.current.cleanup()}),[]);return[i,{start:o,stop:a,abort:c,subscribe:u,unsubscribe:s,clean:l}]},_=function(e){var t=e.color,r=e.activeColor,i=e.isActive;return n.createElement("svg",{"data-testid":"__icon-root__",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24"},n.createElement("g",null,n.createElement("path",{"data-testid":"__icon-path__",fill:t,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"}),i&&n.createElement("circle",{"data-testid":"__icon-active__",fill:r,cx:"16",cy:"4",r:"4"})))};_.propTypes={color:r.string,activeColor:r.string,isActive:r.bool},_.defaultProps={color:"black",activeColor:"red",isActive:!1};var S=function(e){var r=e.children,i=e.lang,o=e.grammars,a=e.timeout,c=e.ariaLabel,u=e.tabIndex,f=e.style,p=e.className,v=e.onStart,h=e.onEnd,d=e.onSpeechStart,m=e.onSpeechEnd,b=e.onResult,y=e.onError,S=e.onNoMatch,E=e.__rsInstance,O=l(t.useState(!1),2),k=O[0],R=O[1],x=l(w(i,o,E),2)[1],j=x.start,T=x.stop,A=x.subscribe,L=x.unsubscribe,P=l(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=t.useRef(-1),i=t.useCallback((function(){clearTimeout(r.current),r.current=-1}),[]),o=t.useCallback((function(){i(),r.current=setTimeout(e,n)}),[e,n,i]);return t.useEffect((function(){return i}),[i]),[o,i]}((function(){return I()}),a),2),D=P[0],C=P[1],N=function(){try{R(!1),L("start",U),L("end",I),L("speechstart",M),L("speechend",G),L("result",z),L("error",H),L("nomatch",q),T()}catch(e){y&&y(e)}},U=function(e){D(),v&&v(e)},I=function(e){C(),N(),h&&h(e)},M=function(e){C(),d&&d(e)},G=function(e){D(),m&&m(e)},z=function(e,t){N(),b&&b(e,t)},H=function(e){N(),y&&y(e)},q=function(e){S&&S(e)};return g.isSupported&&t.cloneElement(t.isValidElement(r)?r:n.createElement("div",{"data-testid":"__vocal-root__",role:"button","aria-label":c,tabIndex:u,style:p?null:s({width:24,height:24,cursor:k?null:"pointer"},f),className:p},n.createElement(_,{isActive:k,iconColor:"#aaa"})),s({},!k&&{onClick:function(){!function(){try{R(!0),A("start",U),A("end",I),A("speechstart",M),A("speechend",G),A("result",z),A("error",H),A("nomatch",q),j()}catch(e){H(e)}}()}}))};S.propTypes={lang:r.string,grammars:r.object,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},S.defaultProps={lang:"en-US",grammars:null,timeout:3e3,ariaLabel:"speech",tabIndex:-1,style:null,className:null,onStart:null,onEnd:null,onSpeechStart:null,onSpeechEnd:null,onResult:null,onError:null,onNoMatch:null};var E=g.isSupported;exports.default=S,exports.isSupported=E,exports.useVocal=w; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbIi4uL25vZGVfbW9kdWxlcy9AdW50ZW1wcy91c2VyLXBlcm1pc3Npb25zLXV0aWxzL2Rpc3QvaW5kZXguZXMuanMiLCIuLi9zcmMvY29yZS9TcGVlY2hSZWNvZ25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U8sS0FDUEMsVUFBVyxLQUNYQyxRQUFTLEtBQ1RDLE1BQU8sS0FDUEMsY0FBZSxLQUNmQyxZQUFhLEtBQ2JDLFNBQVUsS0FDVkMsUUFBUyxLQUNUQyxVQUFXLFVFOUtDdEMsRUFBY2pFLEVBQXlCaUUifQ== |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["exports","react","prop-types"],t):t((e=e||self)["react-vocal"]={},e.React,e.PropTypes)}(this,(function(e,t,n){"use strict";var r="default"in t?t.default:t;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 p(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 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 d(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 h(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)?h(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 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}n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;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("Permissions not supported","NOT_FOUND_ERR")),e.next=16;break;case 4:return e.prev=4,e.next=7,navigator.permissions.query({name:t});case 7:i=e.sent,o=function e(t){i.removeEventListener("change",e),y(t.target.state,n,r)},i.addEventListener("change",o),y(i.state,n,r),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(4),r(e.t0);case 16:case"end":return e.stop()}}),e,null,[[4,13]])})));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(e,t,n){switch(e){case"denied":n(new DOMException("Permission denied","NOT_ALLOWED_ERR"));break;default:t(e)}},b=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("MediaDevices not supported","NOT_FOUND_ERR")),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=d(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)}}(),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),c(this,"_instance",null),c(this,"_listeners",null);var r=e._resolveSpeechRecognition()||{};this._instance=new r,this._listeners={},Object.entries(u(u({},e.defaultOptions),t||{})).forEach((function(t){var r=l(t,2),i=r[0],o=r[1];"grammars"!==i||o||(o=new(e._resolveSpeechGrammarList()||{}));n._instance[i]=o}))}var t,n;return a(e,null,[{key:"isSupported",get:function(){return!!e._resolveSpeechRecognition()},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,b("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:"_includesEventType",value:function(t){return Object.values(e.eventTypes).find((function(e){return e===t}))}},{key:"instance",get:function(){return this._instance},set:function(e){throw new Error("You cannot set instance directly.")}}],[{key:"_resolveSpeechRecognition",value:function(){return window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition}},{key:"_resolveSpeechGrammarList",value:function(){return window.SpeechGrammarList||window.webkitSpeechGrammarList||window.mozSpeechGrammarList||window.msSpeechGrammarList}}]),e}();c(w,"defaultOptions",{grammars:null,lang:"en-US",continuous:!1,interimResults:!1,maxAlternatives:1,serviceURI:null}),c(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 g=function(e){var t=e.iconColor,n=void 0===t?"black":t,i=e.activeColor,o=void 0===i?"red":i,a=e.isActive,c=void 0!==a&&a;return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{fill:n,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&&r.createElement("circle",{fill:o,cx:"16",cy:"4",r:"4"})))},E=function(e){var n=e.children,i=e.grammars,o=e.lang,a=e.timeout,c=e.ariaLabel,s=e.tabIndex,f=e.style,p=e.className,v=e.onStart,d=e.onEnd,h=e.onSpeechStart,m=e.onSpeechEnd,y=e.onResult,b=e.onError,E=e.onNoMatch,S=e.__recognitionInstance,_=t.useRef(null),O=t.useRef(null),R=l(t.useState(!1),2),x=R[0],L=R[1];t.useEffect((function(){if(w.isSupported)return O.current=S||new w({grammars:i,lang:o}),function(){O.current.abort(),O.current.cleanup(),clearTimeout(_.current)}}),[S,i,o]);var k=function(){_.current=setTimeout(A,a)},j=function(){clearTimeout(_.current),_.current=null},T=function(){try{L(!1);var e=O.current;e.removeEventListener("start",P),e.removeEventListener("end",A),e.removeEventListener("speechstart",D),e.removeEventListener("speechend",N),e.removeEventListener("result",U),e.removeEventListener("error",I),e.removeEventListener("nomatch",M),e.stop()}catch(e){b&&b(e)}},P=function(e){k(),v&&v(e)},A=function(e){j(),T(),d&&d(e)},D=function(e){j(),h&&h(e)},N=function(e){k(),m&&m(e)},U=function(e,t){T(),y&&y(e,t)},I=function(e){T(),b&&b(e)},M=function(e){E&&E(e)};return w.isSupported&&t.cloneElement(t.isValidElement(n)?n:r.createElement("div",{"data-testid":"__vocal-root__",role:"button","aria-label":c,tabIndex:s,style:p?null:u({width:24,height:24,cursor:x?null:"pointer"},f),className:p},r.createElement(g,{isActive:x,iconColor:"#aaa"})),u({},!x&&{onClick:function(){!function(){try{L(!0);var e=O.current;e.addEventListener("start",P),e.addEventListener("end",A),e.addEventListener("speechstart",D),e.addEventListener("speechend",N),e.addEventListener("result",U),e.addEventListener("error",I),e.addEventListener("nomatch",M),e.start()}catch(e){I(e)}}()}}))};E.propTypes={grammars:n.object,lang:n.string,timeout:n.number,ariaLabel:n.string,tabIndex:n.number,style:n.object,className:n.string,onStart:n.func,onEnd:n.func,onSpeechStart:n.func,onSpeechEnd:n.func,onResult:n.func,onError:n.func,onNoMatch:n.func},E.defaultProps={grammars:null,lang:"en-US",timeout:3e3,ariaLabel:"speech",tabIndex:-1,style:null,className:null,onStart:null,onEnd:null,onSpeechStart:null,onSpeechEnd:null,onResult:null,onError:null,onNoMatch:null};var S=w.isSupported;e.default=E,e.isSupported=S,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,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dkJ0QyxTQUFVa0MsRUFBVUksS0FFcEJyQyxRQUFTaUMsRUFBVUksS0FFbkJwQyxVQUFXZ0MsRUFBVUksTUFHdEJqRCxFQUFNa0QsYUFBZSxDQUNwQi9FLFNBQVUsS0FDVkMsS0FBTSxRQUNOOEIsUUFBUyxJQUNUQyxVQUFXLFNBQ1hDLFVBQVcsRUFDWEMsTUFBTyxLQUNQQyxVQUFXLEtBQ1hDLFFBQVMsS0FDVEMsTUFBTyxLQUNQQyxjQUFlLEtBQ2ZDLFlBQWEsS0FDYkMsU0FBVSxLQUNWQyxRQUFTLEtBQ1RDLFVBQVcsVUMxTUNTLEVBQWMvRixFQUF5QitGIn0= | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["exports","react","prop-types"],t):t((e=e||self)["react-vocal"]={},e.React,e.PropTypes)}(this,(function(e,t,n){"use strict";var r="default"in t?t.default:t;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 h(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 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}n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;var m=function(){var e=h(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=h(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("Permissions not supported","NOT_FOUND_ERR")),e.next=16;break;case 4:return e.prev=4,e.next=7,navigator.permissions.query({name:t});case 7:i=e.sent,o=function e(t){i.removeEventListener("change",e),b(t.target.state,n,r)},i.addEventListener("change",o),b(i.state,n,r),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(4),r(e.t0);case 16:case"end":return e.stop()}}),e,null,[[4,13]])})));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)}}(),b=function(e,t,n){switch(e){case"denied":n(new DOMException("Permission denied","NOT_ALLOWED_ERR"));break;default:t(e)}},y=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;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.mediaDevices){e.next=4;break}i(new DOMException("MediaDevices not supported","NOT_FOUND_ERR")),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=v(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)}}(),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),c(this,"_instance",null),c(this,"_listeners",null);var r=e._resolveSpeechRecognition()||{};this._instance=new r,this._listeners={},Object.entries(s(s({},e.defaultOptions),t||{})).forEach((function(t){var r=l(t,2),i=r[0],o=r[1];"grammars"!==i||o||(o=new(e._resolveSpeechGrammarList()||{}));n._instance[i]=o}))}var t,n;return a(e,null,[{key:"isSupported",get:function(){return!!e._resolveSpeechRecognition()},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:"_includesEventType",value:function(t){return Object.values(e.eventTypes).find((function(e){return e===t}))}},{key:"instance",get:function(){return this._instance},set:function(e){throw new Error("You cannot set instance directly.")}}],[{key:"_resolveSpeechRecognition",value:function(){return window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition}},{key:"_resolveSpeechGrammarList",value:function(){return window.SpeechGrammarList||window.webkitSpeechGrammarList||window.mozSpeechGrammarList||window.msSpeechGrammarList}}]),e}();c(g,"defaultOptions",{grammars:null,lang:"en-US",continuous:!1,interimResults:!1,maxAlternatives:1,serviceURI:null}),c(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 w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=t.useRef(null);t.useEffect((function(){if(g.isSupported)return i.current=r||new g({lang:e,grammars:n}),function(){i.current.abort(),i.current.cleanup()}}),[e,n,r]);var o=t.useCallback((function(){i.current&&i.current.start()}),[]),a=t.useCallback((function(){i.current&&i.current.stop()}),[]),c=t.useCallback((function(){i.current&&i.current.abort()}),[]),u=t.useCallback((function(e,t){i.current&&i.current.addEventListener(e,t)}),[]),s=t.useCallback((function(e,t){i.current&&i.current.removeEventListener(e,t)}),[]),l=t.useCallback((function(){i.current&&i.current.cleanup()}),[]);return[i,{start:o,stop:a,abort:c,subscribe:u,unsubscribe:s,clean:l}]},_=function(e){var t=e.color,n=e.activeColor,i=e.isActive;return r.createElement("svg",{"data-testid":"__icon-root__",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24"},r.createElement("g",null,r.createElement("path",{"data-testid":"__icon-path__",fill:t,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"}),i&&r.createElement("circle",{"data-testid":"__icon-active__",fill:n,cx:"16",cy:"4",r:"4"})))};_.propTypes={color:n.string,activeColor:n.string,isActive:n.bool},_.defaultProps={color:"black",activeColor:"red",isActive:!1};var S=function(e){var n=e.children,i=e.lang,o=e.grammars,a=e.timeout,c=e.ariaLabel,u=e.tabIndex,f=e.style,p=e.className,h=e.onStart,v=e.onEnd,d=e.onSpeechStart,m=e.onSpeechEnd,b=e.onResult,y=e.onError,S=e.onNoMatch,E=e.__rsInstance,O=l(t.useState(!1),2),k=O[0],R=O[1],x=l(w(i,o,E),2)[1],j=x.start,T=x.stop,P=x.subscribe,A=x.unsubscribe,L=l(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=t.useRef(-1),i=t.useCallback((function(){clearTimeout(r.current),r.current=-1}),[]),o=t.useCallback((function(){i(),r.current=setTimeout(e,n)}),[e,n,i]);return t.useEffect((function(){return i}),[i]),[o,i]}((function(){return I()}),a),2),D=L[0],C=L[1],N=function(){try{R(!1),A("start",U),A("end",I),A("speechstart",M),A("speechend",G),A("result",z),A("error",H),A("nomatch",q),T()}catch(e){y&&y(e)}},U=function(e){D(),h&&h(e)},I=function(e){C(),N(),v&&v(e)},M=function(e){C(),d&&d(e)},G=function(e){D(),m&&m(e)},z=function(e,t){N(),b&&b(e,t)},H=function(e){N(),y&&y(e)},q=function(e){S&&S(e)};return g.isSupported&&t.cloneElement(t.isValidElement(n)?n:r.createElement("div",{"data-testid":"__vocal-root__",role:"button","aria-label":c,tabIndex:u,style:p?null:s({width:24,height:24,cursor:k?null:"pointer"},f),className:p},r.createElement(_,{isActive:k,iconColor:"#aaa"})),s({},!k&&{onClick:function(){!function(){try{R(!0),P("start",U),P("end",I),P("speechstart",M),P("speechend",G),P("result",z),P("error",H),P("nomatch",q),j()}catch(e){H(e)}}()}}))};S.propTypes={lang:n.string,grammars:n.object,timeout:n.number,ariaLabel:n.string,tabIndex:n.number,style:n.object,className:n.string,onStart:n.func,onEnd:n.func,onSpeechStart:n.func,onSpeechEnd:n.func,onResult:n.func,onError:n.func,onNoMatch:n.func},S.defaultProps={lang:"en-US",grammars:null,timeout:3e3,ariaLabel:"speech",tabIndex:-1,style:null,className:null,onStart:null,onEnd:null,onSpeechStart:null,onSpeechEnd:null,onResult:null,onError:null,onNoMatch:null};var E=g.isSupported;e.default=S,e.isSupported=E,e.useVocal=w,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXgudW1kLmpzIiwic291cmNlcyI6WyIuLi9ub2RlX21vZHVsZXMvQHVudGVtcHMvdXNlci1wZXJtaXNzaW9ucy11dGlscy9kaXN0L2luZGV4LmVzLmpzIiwiLi4vc3JjL2NvcmUvU3BlZWNoUmVjb2duaXRpb25XcmFwcGVyLmpzIiwiLi4vc3JjL2hvb2tzL3VzZVZvY2FsLmpzIiwiLi4vc3JjL2NvbXBvbmVudHMvSWNvbi5qcyIsIi4uL3NyYy9jb21wb25lbnRzL1ZvY2FsLmpzIiwiLi4vc3JjL2hvb2tzL3VzZVRpbWVvdXQuanMiLCIuLi9zcmMvaW5kZXguanMiXSwic291cmNlc0NvbnRlbnQiO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QjdDLEVBQVUsTUFBT3lDLEdBQ2pCekMsRUFBVSxjQUFlOEMsR0FDekI5QyxFQUFVLFlBQWErQyxHQUN2Qi9DLEVBQVUsU0FBVWdELEdBQ3BCaEQsRUFBVSxRQUFTaUQsR0FDbkJqRCxFQUFVLFVBQVdrRCxHQUNyQnZHLElBQ0MsTUFBT0UsR0FDUm9HLEVBQVNwRyxJQXNCVjZHLFFBaUVGckMsRUFBTUwsVUFBWSxDQUVqQnhDLEtBQU15QyxFQUFVQyxPQUVoQjNDLFNBQVUwQyxFQUFVMEMsT0FFcEJwQyxRQUFTTixFQUFVMkMsT0FFbkJwQyxVQUFXUCxFQUFVQyxPQUVyQk8sU0FBVVIsRUFBVTJDLE9BRXBCbEMsTUFBT1QsRUFBVTBDLE9BRWpCaEMsVUFBV1YsRUFBVUMsT0FFckJVLFFBQVNYLEVBQVU0QyxLQUVuQmhDLE1BQU9aLEVBQVU0QyxLQUVqQi9CLGNBQWViLEVBQVU0QyxLQUV6QjlCLFlBQWFkLEVBQVU0QyxLQUV2QjdCLFNBQVVmLEVBQVU0QyxLQUVwQjVCLFFBQVNoQixFQUFVNEMsS0FFbkIzQixVQUFXakIsRUFBVTRDLE1BR3RCeEMsRUFBTUQsYUFBZSxDQUNwQjVDLEtBQU0sUUFDTkQsU0FBVSxLQUNWZ0QsUUFBUyxJQUNUQyxVQUFXLFNBQ1hDLFVBQVcsRUFDWEMsTUFBTyxLQUNQQyxVQUFXLEtBQ1hDLFFBQVMsS0FDVEMsTUFBTyxLQUNQQyxjQUFlLEtBQ2ZDLFlBQWEsS0FDYkMsU0FBVSxLQUNWQyxRQUFTLEtBQ1RDLFVBQVcsVUU5S0N0QyxFQUFjakUsRUFBeUJpRSJ9 |
{ | ||
"name": "@untemps/react-vocal", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"author": "Vincent Le Badezet <v.lebadezet@untemps.net>", | ||
"repository": "git@github.com:untemps/react-vocal.git", | ||
"license": "MIT", | ||
"description": "React component to initiate a SpeechRecognition session", | ||
"description": "React component and hook to initiate a SpeechRecognition session", | ||
"keywords": [ | ||
"Web Speech API", | ||
"SpeechRecognition", | ||
"speech", | ||
"speech-to-text", | ||
"React", | ||
"ReactJS", | ||
"component", | ||
"hook", | ||
"javascript" | ||
@@ -38,2 +42,3 @@ ], | ||
"@testing-library/react": "^10.0.4", | ||
"@testing-library/react-hooks": "^3.3.0", | ||
"@untemps/event-dispatcher": "^1.1.0", | ||
@@ -49,2 +54,3 @@ "@untemps/user-permissions-utils": "^1.0.1", | ||
"react-dom": "^16.13.1", | ||
"react-test-renderer": "^16.13.1", | ||
"rollup": "^2.11.2", | ||
@@ -61,7 +67,7 @@ "rollup-plugin-filesize": "^9.0.0", | ||
"jest": { | ||
"transform": { | ||
"^.+\\.[t|j]sx?$": "babel-jest" | ||
}, | ||
"coverageDirectory": "./coverage/", | ||
"collectCoverage": true | ||
"collectCoverage": true, | ||
"setupFilesAfterEnv": [ | ||
"<rootDir>/jest/jest.setup.js" | ||
] | ||
}, | ||
@@ -68,0 +74,0 @@ "husky": { |
181
README.md
@@ -1,5 +0,9 @@ | ||
![react-vocal](./microphone.png) | ||
# Vocal | ||
<p align="center"> | ||
<img src="assets/react-vocal.png" alt="react-vocal" height="150"/> | ||
</p> | ||
<p align="center"> | ||
A React component and hook to initiate a SpeechRecognition session | ||
</p> | ||
A React component to initiate a SpeechRecognition session | ||
--- | ||
@@ -10,5 +14,9 @@ ![npm](https://img.shields.io/npm/v/@untemps/react-vocal?style=for-the-badge) | ||
## Links | ||
<a href="https://untemps.github.io/react-vocal" target="_blank" rel="noopener">Demo</a> | ||
## Disclaimer | ||
The [Web Speech API](https://developer.mozilla.org/fr/docs/Web/API/Web_Speech_API) is supported by Chrome only so far. On other browsers, the `Vocal` component won't display anything. | ||
The [Web Speech API](https://developer.mozilla.org/fr/docs/Web/API/Web_Speech_API) is only supported by few browsers so far (see [caniuse](https://caniuse.com/#search=SpeechRecognition)). If the API is not available, the `Vocal` component won't display anything. | ||
@@ -23,11 +31,9 @@ ## Installation | ||
Import the `Vocal` component: | ||
### `Vocal` component | ||
#### Basic usage | ||
```javascript | ||
import Vocal from '@untemps/react-vocal' | ||
``` | ||
Instantiate it: | ||
```javascript | ||
const App = () => { | ||
@@ -59,6 +65,8 @@ const [result, setResult] = useState('') | ||
#### Custom component | ||
By default, `Vocal` displays an icon with two states (idle/listening): | ||
![Idle icon](./icon-idle.png) | ||
![Listening icon](./icon-listening.png) | ||
![Idle icon](assets/icon-idle.png) | ||
![Listening icon](assets/icon-listening.png) | ||
@@ -68,2 +76,4 @@ But you can provide your own component: | ||
```javascript | ||
import Vocal from '@untemps/react-vocal' | ||
const App = () => { | ||
@@ -93,20 +103,141 @@ const [isListening, setIsListening] = useState('') | ||
## API | ||
#### API | ||
| Props | Type | Default | Description | | ||
| ------------- | ------ | ------- | ----------------------------------------------------------------------- | | ||
| timeout | number | 3000 | Defines the time in ms to wait before discarding the recognition | | ||
| style | object | null | Defines the styles of the default element if className is not specified | | ||
| className | string | null | Defines the class of the default element | | ||
| onStart | func | null | Defines the handler called when the recognition starts | | ||
| onEnd | func | null | Defines the handler called when the recognition ends | | ||
| onSpeechStart | func | null | Defines the handler called when the speech starts | | ||
| onSpeechEnd | func | null | Defines the handler called when the speech ends | | ||
| onResult | func | null | Defines the handler called when a result is recognized | | ||
| onError | func | null | Defines the handler called when an error occurs | | ||
| onNoMatch | func | null | Defines the handler called when no result can be recognized | | ||
| Props | Type | Default | Description | | ||
| ------------- | ----------------- | ------- | -------------------------------------------------------------------------------------------------- | | ||
| lang | string | 'en-US' | Language understood by the recognition [BCP 47 language tag](https://tools.ietf.org/html/bcp47) | | ||
| grammars | SpeechGrammarList | null | Grammars understood by the recognition [JSpeech Grammar Format](https://www.w3.org/TR/jsgf/) | | ||
| timeout | number | 3000 | Time in ms to wait before discarding the recognition | | ||
| style | object | null | Styles of the root element if className is not specified | | ||
| className | string | null | Class of the root element | | ||
| onStart | func | null | Handler called when the recognition starts | | ||
| onEnd | func | null | Handler called when the recognition ends | | ||
| onSpeechStart | func | null | Handler called when the speech starts | | ||
| onSpeechEnd | func | null | Handler called when the speech ends | | ||
| onResult | func | null | Handler called when a result is recognized | | ||
| onError | func | null | Handler called when an error occurs | | ||
| onNoMatch | func | null | Handler called when no result can be recognized | | ||
### `useVocal` hook | ||
#### Basic usage | ||
```javascript | ||
import React, { useState } from 'react' | ||
import { useVocal } from '@untemps/react-vocal' | ||
import Icon from './Icon' | ||
const App = () => { | ||
const [isListening, setIsListening] = useState(false) | ||
const [result, setResult] = useState('') | ||
const [, {start, subscribe}] = useVocal('fr_FR') | ||
const _onButtonClick = () => { | ||
setIsListening(true) | ||
subscribe('speechstart', _onVocalStart) | ||
subscribe('result', _onVocalResult) | ||
subscribe('error', _onVocalError) | ||
start() | ||
} | ||
const _onVocalStart = () => { | ||
setResult('') | ||
} | ||
const _onVocalResult = (result) => { | ||
setIsListening(false) | ||
setResult(result) | ||
} | ||
const _onVocalError = (e) => { | ||
console.error(e) | ||
} | ||
return ( | ||
<div> | ||
<span style={{ position: 'relative' }}> | ||
<div | ||
role="button" | ||
aria-label="Vocal" | ||
tabIndex={0} | ||
style={{ width: 16, position: 'absolute', right: 10, top: 2 }} | ||
onClick={_onButtonClick} | ||
> | ||
<Icon color={isListening ? 'red': 'blue'} /> | ||
</div> | ||
<input defaultValue={result} style={{ width: 300, height: 40 }} /> | ||
</span> | ||
</div> | ||
) | ||
} | ||
``` | ||
#### Signature | ||
``` | ||
useVocal(lang, grammars) | ||
``` | ||
| Args | Type | Default | Description | | ||
| ------------- | ----------------- | ------- | ---------------------------------------------------------------------------------------------------- | | ||
| lang | string | 'en-US' | Language understood by the recognition [BCP 47 language tag](https://tools.ietf.org/html/bcp47) | | ||
| grammars | SpeechGrammarList | null | Grammars understood by the recognition [JSpeech Grammar Format](https://www.w3.org/TR/jsgf/) | | ||
#### Return value | ||
``` | ||
const [ref, { start, stop, abort, subscribe, unsubscribe, clean }] | ||
``` | ||
| Args | Type | Description | | ||
| ------------- | ----------------- | ----------------------------------------------------------- | | ||
| ref | Ref | React ref to the SpeechRecognitionWrapper instance | | ||
| start | func | Function to start the recognition | | ||
| stop | func | Function to stop the recognition | | ||
| abort | func | Function to abort the recognition | | ||
| subscribe | func | Function to subscribe to recognition events | | ||
| unsubscribe | func | Function to unsubscribe to recognition events | | ||
| clean | func | Function to clean subscription to recognition events | | ||
### Browser support flag | ||
#### Basic usage | ||
```javascript | ||
import Vocal, {isSupported} from '@untemps/react-vocal' | ||
const App = () => { | ||
return isSupported ? ( | ||
<Vocal /> | ||
) : ( | ||
<p>Your browser does not support Web Speech API</p> | ||
) | ||
} | ||
``` | ||
### Events | ||
| Events | Description | | ||
| ------------- | --------------------------------------------------------------------------------------------------- | | ||
| audioend | Fired when the user agent has finished capturing audio for recognition | | ||
| audiostart | Fired when the user agent has started to capture audio for recognition | | ||
| end | Fired when the recognition service has disconnected | | ||
| error | Fired when a recognition error occurs | | ||
| nomatch | Fired when the recognition service returns a final result with no significant recognition | | ||
| result | Fired when the recognition service returns a result | | ||
| soundend | Fired when any sound — recognisable or not — has stopped being detected | | ||
| soundstart | Fired when any sound — recognisable or not — has been detected | | ||
| speechend | Fired when speech recognized by the recognition service has stopped being detected | | ||
| speechstart | Fired when sound recognized by the recognition service as speech has been detected | | ||
| start | fired when the recognition service has begun listening to incoming audio | | ||
### Notes | ||
The process to grant microphone access permissions is automatically managed by the hook (internally used by the `Vocal` component). | ||
## Todos | ||
- Rewrite with TypeScript | ||
- Add a connector management to plug external speech-to-text services in |
@@ -1,6 +0,7 @@ | ||
import Vocal from './Vocal' | ||
import SpeechRecognitionWrapper from './SpeechRecognitionWrapper' | ||
import Vocal from './components/Vocal' | ||
import SpeechRecognitionWrapper from './core/SpeechRecognitionWrapper' | ||
export { default as useVocal } from './hooks/useVocal' | ||
export const isSupported = SpeechRecognitionWrapper.isSupported | ||
export default Vocal |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
221499
31
1549
239
33