@hoosei/voxweave-react
Version:
A customizable and interactive voice UI component for React applications
3 lines (2 loc) • 2.58 kB
JavaScript
"use strict";var E=Object.create;var h=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var S=(t,e,o,_)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of R(e))!I.call(t,n)&&n!==o&&h(t,n,{get:()=>e[n],enumerable:!(_=O(e,n))||_.enumerable});return t};var T=(t,e,o)=>(o=t!=null?E(v(t)):{},S(e||!t||!t.__esModule?h(o,"default",{value:t,enumerable:!0}):o,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),d=require("framer-motion"),p=require("./index8.js"),x=require("./index58.js"),a=require("react/jsx-runtime"),b=({darkMode:t=!1,size:e=200,containerPosition:o})=>a.jsx(d.motion.div,{className:"vox:flex vox:items-center vox:justify-center",initial:{opacity:0,height:0},animate:{opacity:1,width:o==="bottom"?e/1.6:e,height:o==="bottom"?e/1.6:e},exit:{opacity:0,height:0},transition:{duration:.5,ease:"easeInOut",height:{duration:.5,ease:"easeInOut"}},children:a.jsx("div",{className:p.cn("vox:animate-spin vox:rounded-full vox:h-8 vox:w-8 vox:border-b-2 vox:border-gray-900",t?"vox:border-white/50":"vox:border-gray-900/50")})});function g(t){const[e,o]=c.useState(null),[_,n]=c.useState(!0),{size:r=200,darkMode:f=!1,containerPosition:s,isVertical:i,animation:m}=t;return c.useEffect(()=>{typeof window<"u"&&import("react").then(l=>{const u=l;return u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED||(u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED={}),u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner||(u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner={current:null}),Promise.resolve().then(()=>require("./index57.js"))}).then(l=>{o(()=>l.VoxweaveThreeJS),setTimeout(()=>n(!1),100)}).catch(l=>{console.error("Failed to load Three.js component:",l)})},[]),a.jsx(d.motion.div,{className:"vox:overflow-hidden",initial:{height:s==="bottom"?r/1.8:r,width:x.isAuroraAnimation(m)?0:s==="bottom"&&!i?r*.8:"auto",display:i?"block":"flex",justifyContent:i?"flex-start":"center",alignItems:i?"flex-start":"center"},animate:{height:s==="bottom"?r/1.8:r,width:x.isAuroraAnimation(m)?0:s==="bottom"&&!i?r*.8:"auto",display:i?"block":"flex",justifyContent:i?"flex-start":"center",alignItems:i?"flex-start":"center"},transition:{duration:.6,ease:"easeInOut"},children:a.jsx(d.AnimatePresence,{mode:"wait",children:_?a.jsx(b,{darkMode:f,size:r,containerPosition:s},"loader"):e?a.jsx(e,{...t}):null})},"three-wrapper")}exports.ThreeWrapper=g;
//# sourceMappingURL=index13.js.map