@rufous/ui 0.1.88 → 0.1.89

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/main.cjs CHANGED
@@ -37636,7 +37636,6 @@ var TextToSpeech_default = TextToSpeech;
37636
37636
 
37637
37637
  // lib/RufousTextEditor/SpeechToText.tsx
37638
37638
  var import_react53 = __toESM(require("react"), 1);
37639
- var SpeechRecognitionAPI = window.SpeechRecognition || window.webkitSpeechRecognition;
37640
37639
  var SpeechToText = ({ editor, onSpeechToText }) => {
37641
37640
  const [listening, setListening] = (0, import_react53.useState)(false);
37642
37641
  const [showPanel, setShowPanel] = (0, import_react53.useState)(false);
@@ -37645,6 +37644,7 @@ var SpeechToText = ({ editor, onSpeechToText }) => {
37645
37644
  const recognitionRef = (0, import_react53.useRef)(null);
37646
37645
  const panelRef = (0, import_react53.useRef)(null);
37647
37646
  const isListeningRef = (0, import_react53.useRef)(false);
37647
+ const SpeechRecognitionAPI = typeof window !== "undefined" ? window.SpeechRecognition || window.webkitSpeechRecognition : null;
37648
37648
  const supported = !!SpeechRecognitionAPI;
37649
37649
  (0, import_react53.useEffect)(() => {
37650
37650
  const handleClick = (e) => {
package/dist/main.js CHANGED
@@ -8967,7 +8967,6 @@ var TextToSpeech_default = TextToSpeech;
8967
8967
 
8968
8968
  // lib/RufousTextEditor/SpeechToText.tsx
8969
8969
  import React109, { useState as useState28, useRef as useRef25, useCallback as useCallback10, useEffect as useEffect22 } from "react";
8970
- var SpeechRecognitionAPI = window.SpeechRecognition || window.webkitSpeechRecognition;
8971
8970
  var SpeechToText = ({ editor, onSpeechToText }) => {
8972
8971
  const [listening, setListening] = useState28(false);
8973
8972
  const [showPanel, setShowPanel] = useState28(false);
@@ -8976,6 +8975,7 @@ var SpeechToText = ({ editor, onSpeechToText }) => {
8976
8975
  const recognitionRef = useRef25(null);
8977
8976
  const panelRef = useRef25(null);
8978
8977
  const isListeningRef = useRef25(false);
8978
+ const SpeechRecognitionAPI = typeof window !== "undefined" ? window.SpeechRecognition || window.webkitSpeechRecognition : null;
8979
8979
  const supported = !!SpeechRecognitionAPI;
8980
8980
  useEffect22(() => {
8981
8981
  const handleClick = (e) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rufous/ui",
3
3
  "private": false,
4
- "version": "0.1.88",
4
+ "version": "0.1.89",
5
5
  "type": "module",
6
6
  "description": "Experimental: A lightweight React UI component library (Beta)",
7
7
  "style": "./dist/main.css",