tetrons 2.3.96 → 2.3.97

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
@@ -16878,7 +16878,6 @@ function FileGroup({ editor }) {
16878
16878
  var import_react18 = __toESM(require("react"));
16879
16879
  var import_fa2 = require("react-icons/fa");
16880
16880
  var import_loaders = require("@uiball/loaders");
16881
- var import_framer_motion = require("framer-motion");
16882
16881
  function AiGroup({ editor, enabledFeatures }) {
16883
16882
  const [isRecording, setIsRecording] = (0, import_react18.useState)(false);
16884
16883
  const [audioBlob, setAudioBlob] = (0, import_react18.useState)(null);
@@ -16962,8 +16961,7 @@ function AiGroup({ editor, enabledFeatures }) {
16962
16961
  setIsLoadingAI(false);
16963
16962
  }
16964
16963
  };
16965
- if (!enabledFeatures.includes("voice to text")) return null;
16966
- return /* @__PURE__ */ import_react18.default.createElement("div", { className: "group flex flex-col gap-2 items-start" }, /* @__PURE__ */ import_react18.default.createElement("div", { className: "flex gap-2 items-center" }, enabledFeatures.includes("voice to text") && !isRecording && /* @__PURE__ */ import_react18.default.createElement(
16964
+ return /* @__PURE__ */ import_react18.default.createElement("div", { className: "group flex flex-col gap-2 items-start" }, /* @__PURE__ */ import_react18.default.createElement("div", { className: "flex gap-2 items-center" }, enabledFeatures.includes("voice to text") && /* @__PURE__ */ import_react18.default.createElement(import_react18.default.Fragment, null, !isRecording ? /* @__PURE__ */ import_react18.default.createElement(
16967
16965
  "button",
16968
16966
  {
16969
16967
  type: "button",
@@ -16972,7 +16970,7 @@ function AiGroup({ editor, enabledFeatures }) {
16972
16970
  title: "Start Voice Input"
16973
16971
  },
16974
16972
  /* @__PURE__ */ import_react18.default.createElement(import_fa2.FaMicrophone, { size: 18 })
16975
- ), enabledFeatures.includes("voice to text") && isRecording && /* @__PURE__ */ import_react18.default.createElement(
16973
+ ) : /* @__PURE__ */ import_react18.default.createElement(
16976
16974
  "button",
16977
16975
  {
16978
16976
  type: "button",
@@ -16981,7 +16979,7 @@ function AiGroup({ editor, enabledFeatures }) {
16981
16979
  title: "Stop Recording"
16982
16980
  },
16983
16981
  /* @__PURE__ */ import_react18.default.createElement(import_fa2.FaStop, { size: 18 })
16984
- ), enabledFeatures.includes("ai") && /* @__PURE__ */ import_react18.default.createElement(
16982
+ )), enabledFeatures.includes("ai") && /* @__PURE__ */ import_react18.default.createElement(
16985
16983
  "button",
16986
16984
  {
16987
16985
  type: "button",
@@ -16990,51 +16988,32 @@ function AiGroup({ editor, enabledFeatures }) {
16990
16988
  title: "AI Assist"
16991
16989
  },
16992
16990
  "AI"
16993
- )), isRecording && /* @__PURE__ */ import_react18.default.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ import_react18.default.createElement(import_loaders.Waveform, { size: 30, lineWeight: 3.5, speed: 1, color: "#4F46E5" }), /* @__PURE__ */ import_react18.default.createElement("p", { className: "text-sm mt-1 text-gray-600" }, "Recording...")), isTranscribing && /* @__PURE__ */ import_react18.default.createElement("p", { className: "text-sm text-gray-500" }, "Transcribing..."), transcriptionError && /* @__PURE__ */ import_react18.default.createElement("p", { className: "text-sm text-red-600" }, transcriptionError), audioBlob && /* @__PURE__ */ import_react18.default.createElement("div", { className: "mt-2" }, /* @__PURE__ */ import_react18.default.createElement("audio", { controls: true, src: URL.createObjectURL(audioBlob) })), /* @__PURE__ */ import_react18.default.createElement(import_framer_motion.AnimatePresence, null, showPromptInput && /* @__PURE__ */ import_react18.default.createElement(
16994
- import_framer_motion.motion.div,
16991
+ )), isRecording && /* @__PURE__ */ import_react18.default.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ import_react18.default.createElement(import_loaders.Waveform, { size: 30, lineWeight: 3.5, speed: 1, color: "#4F46E5" }), /* @__PURE__ */ import_react18.default.createElement("p", { className: "text-sm mt-1 text-gray-600" }, "Recording...")), isTranscribing && /* @__PURE__ */ import_react18.default.createElement("p", { className: "text-sm text-gray-500" }, "Transcribing..."), transcriptionError && /* @__PURE__ */ import_react18.default.createElement("p", { className: "text-sm text-red-600" }, transcriptionError), audioBlob && /* @__PURE__ */ import_react18.default.createElement("div", { className: "mt-2" }, /* @__PURE__ */ import_react18.default.createElement("audio", { controls: true, src: URL.createObjectURL(audioBlob) })), showPromptInput && /* @__PURE__ */ import_react18.default.createElement("div", { className: "ai-modal-backdrop" }, /* @__PURE__ */ import_react18.default.createElement("div", { className: "ai-modal-content" }, /* @__PURE__ */ import_react18.default.createElement("h2", { className: "ai-modal-title" }, "AI Prompt"), /* @__PURE__ */ import_react18.default.createElement(
16992
+ "textarea",
16993
+ {
16994
+ className: "ai-modal-textarea",
16995
+ value: prompt2,
16996
+ onChange: (e) => setPrompt(e.target.value),
16997
+ placeholder: "Enter your prompt here..."
16998
+ }
16999
+ ), aiError && /* @__PURE__ */ import_react18.default.createElement("p", { className: "ai-modal-error" }, aiError), /* @__PURE__ */ import_react18.default.createElement("div", { className: "ai-modal-actions" }, /* @__PURE__ */ import_react18.default.createElement(
17000
+ "button",
16995
17001
  {
16996
- className: "ai-modal-backdrop",
16997
- initial: { opacity: 0 },
16998
- animate: { opacity: 1 },
16999
- exit: { opacity: 0 }
17002
+ type: "button",
17003
+ onClick: () => setShowPromptInput(false),
17004
+ className: "ai-cancel-btn"
17000
17005
  },
17001
- /* @__PURE__ */ import_react18.default.createElement(
17002
- import_framer_motion.motion.div,
17003
- {
17004
- className: "ai-modal-content",
17005
- initial: { scale: 0.9, opacity: 0 },
17006
- animate: { scale: 1, opacity: 1 },
17007
- exit: { scale: 0.9, opacity: 0 }
17008
- },
17009
- /* @__PURE__ */ import_react18.default.createElement("h2", { className: "ai-modal-title" }, "AI Prompt"),
17010
- /* @__PURE__ */ import_react18.default.createElement(
17011
- "textarea",
17012
- {
17013
- className: "ai-modal-textarea",
17014
- value: prompt2,
17015
- onChange: (e) => setPrompt(e.target.value),
17016
- placeholder: "Enter your prompt here..."
17017
- }
17018
- ),
17019
- aiError && /* @__PURE__ */ import_react18.default.createElement("p", { className: "ai-modal-error" }, aiError),
17020
- /* @__PURE__ */ import_react18.default.createElement("div", { className: "ai-modal-actions" }, /* @__PURE__ */ import_react18.default.createElement(
17021
- "button",
17022
- {
17023
- onClick: () => setShowPromptInput(false),
17024
- className: "ai-cancel-btn"
17025
- },
17026
- "Cancel"
17027
- ), /* @__PURE__ */ import_react18.default.createElement(
17028
- "button",
17029
- {
17030
- onClick: handlePromptSubmit,
17031
- disabled: isLoadingAI,
17032
- className: "ai-submit-btn"
17033
- },
17034
- isLoadingAI ? "Generating..." : "Submit"
17035
- ))
17036
- )
17037
- )));
17006
+ "Cancel"
17007
+ ), /* @__PURE__ */ import_react18.default.createElement(
17008
+ "button",
17009
+ {
17010
+ type: "button",
17011
+ onClick: handlePromptSubmit,
17012
+ disabled: isLoadingAI,
17013
+ className: "ai-submit-btn"
17014
+ },
17015
+ isLoadingAI ? "Generating..." : "Submit"
17016
+ )))));
17038
17017
  }
17039
17018
 
17040
17019
  // src/components/tetrons/toolbar/AddOnGroup.tsx
package/dist/index.mjs CHANGED
@@ -16887,7 +16887,6 @@ function FileGroup({ editor }) {
16887
16887
  import React12, { useState as useState7, useRef as useRef6 } from "react";
16888
16888
  import { FaMicrophone, FaStop } from "react-icons/fa";
16889
16889
  import { Waveform } from "@uiball/loaders";
16890
- import { motion, AnimatePresence } from "framer-motion";
16891
16890
  function AiGroup({ editor, enabledFeatures }) {
16892
16891
  const [isRecording, setIsRecording] = useState7(false);
16893
16892
  const [audioBlob, setAudioBlob] = useState7(null);
@@ -16971,8 +16970,7 @@ function AiGroup({ editor, enabledFeatures }) {
16971
16970
  setIsLoadingAI(false);
16972
16971
  }
16973
16972
  };
16974
- if (!enabledFeatures.includes("voice to text")) return null;
16975
- return /* @__PURE__ */ React12.createElement("div", { className: "group flex flex-col gap-2 items-start" }, /* @__PURE__ */ React12.createElement("div", { className: "flex gap-2 items-center" }, enabledFeatures.includes("voice to text") && !isRecording && /* @__PURE__ */ React12.createElement(
16973
+ return /* @__PURE__ */ React12.createElement("div", { className: "group flex flex-col gap-2 items-start" }, /* @__PURE__ */ React12.createElement("div", { className: "flex gap-2 items-center" }, enabledFeatures.includes("voice to text") && /* @__PURE__ */ React12.createElement(React12.Fragment, null, !isRecording ? /* @__PURE__ */ React12.createElement(
16976
16974
  "button",
16977
16975
  {
16978
16976
  type: "button",
@@ -16981,7 +16979,7 @@ function AiGroup({ editor, enabledFeatures }) {
16981
16979
  title: "Start Voice Input"
16982
16980
  },
16983
16981
  /* @__PURE__ */ React12.createElement(FaMicrophone, { size: 18 })
16984
- ), enabledFeatures.includes("voice to text") && isRecording && /* @__PURE__ */ React12.createElement(
16982
+ ) : /* @__PURE__ */ React12.createElement(
16985
16983
  "button",
16986
16984
  {
16987
16985
  type: "button",
@@ -16990,7 +16988,7 @@ function AiGroup({ editor, enabledFeatures }) {
16990
16988
  title: "Stop Recording"
16991
16989
  },
16992
16990
  /* @__PURE__ */ React12.createElement(FaStop, { size: 18 })
16993
- ), enabledFeatures.includes("ai") && /* @__PURE__ */ React12.createElement(
16991
+ )), enabledFeatures.includes("ai") && /* @__PURE__ */ React12.createElement(
16994
16992
  "button",
16995
16993
  {
16996
16994
  type: "button",
@@ -16999,51 +16997,32 @@ function AiGroup({ editor, enabledFeatures }) {
16999
16997
  title: "AI Assist"
17000
16998
  },
17001
16999
  "AI"
17002
- )), isRecording && /* @__PURE__ */ React12.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React12.createElement(Waveform, { size: 30, lineWeight: 3.5, speed: 1, color: "#4F46E5" }), /* @__PURE__ */ React12.createElement("p", { className: "text-sm mt-1 text-gray-600" }, "Recording...")), isTranscribing && /* @__PURE__ */ React12.createElement("p", { className: "text-sm text-gray-500" }, "Transcribing..."), transcriptionError && /* @__PURE__ */ React12.createElement("p", { className: "text-sm text-red-600" }, transcriptionError), audioBlob && /* @__PURE__ */ React12.createElement("div", { className: "mt-2" }, /* @__PURE__ */ React12.createElement("audio", { controls: true, src: URL.createObjectURL(audioBlob) })), /* @__PURE__ */ React12.createElement(AnimatePresence, null, showPromptInput && /* @__PURE__ */ React12.createElement(
17003
- motion.div,
17000
+ )), isRecording && /* @__PURE__ */ React12.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React12.createElement(Waveform, { size: 30, lineWeight: 3.5, speed: 1, color: "#4F46E5" }), /* @__PURE__ */ React12.createElement("p", { className: "text-sm mt-1 text-gray-600" }, "Recording...")), isTranscribing && /* @__PURE__ */ React12.createElement("p", { className: "text-sm text-gray-500" }, "Transcribing..."), transcriptionError && /* @__PURE__ */ React12.createElement("p", { className: "text-sm text-red-600" }, transcriptionError), audioBlob && /* @__PURE__ */ React12.createElement("div", { className: "mt-2" }, /* @__PURE__ */ React12.createElement("audio", { controls: true, src: URL.createObjectURL(audioBlob) })), showPromptInput && /* @__PURE__ */ React12.createElement("div", { className: "ai-modal-backdrop" }, /* @__PURE__ */ React12.createElement("div", { className: "ai-modal-content" }, /* @__PURE__ */ React12.createElement("h2", { className: "ai-modal-title" }, "AI Prompt"), /* @__PURE__ */ React12.createElement(
17001
+ "textarea",
17002
+ {
17003
+ className: "ai-modal-textarea",
17004
+ value: prompt2,
17005
+ onChange: (e) => setPrompt(e.target.value),
17006
+ placeholder: "Enter your prompt here..."
17007
+ }
17008
+ ), aiError && /* @__PURE__ */ React12.createElement("p", { className: "ai-modal-error" }, aiError), /* @__PURE__ */ React12.createElement("div", { className: "ai-modal-actions" }, /* @__PURE__ */ React12.createElement(
17009
+ "button",
17004
17010
  {
17005
- className: "ai-modal-backdrop",
17006
- initial: { opacity: 0 },
17007
- animate: { opacity: 1 },
17008
- exit: { opacity: 0 }
17011
+ type: "button",
17012
+ onClick: () => setShowPromptInput(false),
17013
+ className: "ai-cancel-btn"
17009
17014
  },
17010
- /* @__PURE__ */ React12.createElement(
17011
- motion.div,
17012
- {
17013
- className: "ai-modal-content",
17014
- initial: { scale: 0.9, opacity: 0 },
17015
- animate: { scale: 1, opacity: 1 },
17016
- exit: { scale: 0.9, opacity: 0 }
17017
- },
17018
- /* @__PURE__ */ React12.createElement("h2", { className: "ai-modal-title" }, "AI Prompt"),
17019
- /* @__PURE__ */ React12.createElement(
17020
- "textarea",
17021
- {
17022
- className: "ai-modal-textarea",
17023
- value: prompt2,
17024
- onChange: (e) => setPrompt(e.target.value),
17025
- placeholder: "Enter your prompt here..."
17026
- }
17027
- ),
17028
- aiError && /* @__PURE__ */ React12.createElement("p", { className: "ai-modal-error" }, aiError),
17029
- /* @__PURE__ */ React12.createElement("div", { className: "ai-modal-actions" }, /* @__PURE__ */ React12.createElement(
17030
- "button",
17031
- {
17032
- onClick: () => setShowPromptInput(false),
17033
- className: "ai-cancel-btn"
17034
- },
17035
- "Cancel"
17036
- ), /* @__PURE__ */ React12.createElement(
17037
- "button",
17038
- {
17039
- onClick: handlePromptSubmit,
17040
- disabled: isLoadingAI,
17041
- className: "ai-submit-btn"
17042
- },
17043
- isLoadingAI ? "Generating..." : "Submit"
17044
- ))
17045
- )
17046
- )));
17015
+ "Cancel"
17016
+ ), /* @__PURE__ */ React12.createElement(
17017
+ "button",
17018
+ {
17019
+ type: "button",
17020
+ onClick: handlePromptSubmit,
17021
+ disabled: isLoadingAI,
17022
+ className: "ai-submit-btn"
17023
+ },
17024
+ isLoadingAI ? "Generating..." : "Submit"
17025
+ )))));
17047
17026
  }
17048
17027
 
17049
17028
  // src/components/tetrons/toolbar/AddOnGroup.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tetrons",
3
- "version": "2.3.96",
3
+ "version": "2.3.97",
4
4
  "description": "A Next.js project written in TypeScript",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",