react-voice-to-speech 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -439,10 +439,17 @@ var BasicVoiceToSpeechButton = ({ lang = "en", onDataReady, className, id, style
439
439
  onDataReady(data);
440
440
  };
441
441
  const uiLabels = { ...DefaultVoiceToSpeechLabels, ...labels };
442
+ const onClick = (e) => {
443
+ if (e) {
444
+ e.preventDefault();
445
+ e.stopPropagation();
446
+ }
447
+ setIsOpen(true);
448
+ };
442
449
  return /* @__PURE__ */ _react2.default.createElement(_react2.default.Fragment, null, /* @__PURE__ */ _react2.default.createElement(
443
450
  "button",
444
451
  {
445
- onClick: () => setIsOpen(true),
452
+ onClick,
446
453
  disabled: !isSupported,
447
454
  className,
448
455
  id,
package/dist/index.js CHANGED
@@ -439,10 +439,17 @@ var BasicVoiceToSpeechButton = ({ lang = "en", onDataReady, className, id, style
439
439
  onDataReady(data);
440
440
  };
441
441
  const uiLabels = { ...DefaultVoiceToSpeechLabels, ...labels };
442
+ const onClick = (e) => {
443
+ if (e) {
444
+ e.preventDefault();
445
+ e.stopPropagation();
446
+ }
447
+ setIsOpen(true);
448
+ };
442
449
  return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(
443
450
  "button",
444
451
  {
445
- onClick: () => setIsOpen(true),
452
+ onClick,
446
453
  disabled: !isSupported,
447
454
  className,
448
455
  id,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-voice-to-speech",
3
3
  "description": "A lightweight, customizable React component and hook for voice-to-text recognition using the Web Speech API. Includes a built-in recording overlay.",
4
- "version": "1.0.0",
4
+ "version": "1.0.2",
5
5
  "type": "module",
6
6
  "sideEffects": [
7
7
  "**/*.css"