- apps/web: test updates (Vitest/setup), playbackAnalyticsService, TrackGrid, serviceErrorHandler - veza-common: logging, metrics, traits, validation, random - veza-stream-server: audio pipeline, codecs, cache, monitoring, routes - apps/web/dist_verification: refresh build assets (content-hashed filenames) Co-authored-by: Cursor <cursoragent@cursor.com>
1 line
630 B
JavaScript
1 line
630 B
JavaScript
import{a}from"./vendor-react-C9dYU-TK.js";function u(r=2e3){const[c,t]=a.useState(!1),i=a.useCallback(async o=>{if(!o||typeof o!="string")return!1;try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(o),t(!0),setTimeout(()=>t(!1),r),!0}catch{}try{const e=document.createElement("textarea");e.value=o,e.setAttribute("readonly",""),e.style.position="fixed",e.style.left="-9999px",e.style.top="0",document.body.appendChild(e),e.select();const n=document.execCommand("copy");if(document.body.removeChild(e),n)return t(!0),setTimeout(()=>t(!1),r),!0}catch{}return!1},[r]);return{copied:c,copy:i}}export{u};
|