@dotrly/sdk 0.2.0

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 ADDED
@@ -0,0 +1,10 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk7RGKC52Kcjs = require('./chunk-7RGKC52K.cjs');var _react = require('react');function L(){let[r,e]=_react.useState.call(void 0, {isOpen:!1,height:0}),s=_react.useRef.call(void 0, typeof window<"u"?window.innerHeight:0);return _react.useEffect.call(void 0, ()=>{if(!/iPad|iPhone|iPod|Android/.test(navigator.userAgent))return;let o=()=>{if(!window.visualViewport)return;let f=window.visualViewport,m=window.innerHeight;m>s.current&&(s.current=m);let a=m-f.height;a<=0&&(a=s.current-m);let n=a>100;e({isOpen:n,height:n?a:0})};window.visualViewport&&(window.visualViewport.addEventListener("resize",o),window.visualViewport.addEventListener("scroll",o));let d=()=>{setTimeout(()=>{s.current=window.innerHeight,o()},100)};window.addEventListener("orientationchange",d),_optionalChain([window, 'access', _2 => _2.screen, 'optionalAccess', _3 => _3.orientation])&&window.screen.orientation.addEventListener("change",d);let u=f=>{let m=f.target;(m.tagName==="INPUT"||m.tagName==="TEXTAREA")&&setTimeout(o,100)},l=()=>{setTimeout(()=>{e({isOpen:!1,height:0})},100)};return document.addEventListener("focusin",u),document.addEventListener("focusout",l),o(),()=>{_optionalChain([window, 'access', _4 => _4.visualViewport, 'optionalAccess', _5 => _5.removeEventListener, 'call', _6 => _6("resize",o)]),_optionalChain([window, 'access', _7 => _7.visualViewport, 'optionalAccess', _8 => _8.removeEventListener, 'call', _9 => _9("scroll",o)]),document.removeEventListener("focusin",u),document.removeEventListener("focusout",l)}},[]),r}function Va(){return _react.useCallback.call(void 0, ()=>{window.postMessage("relay:close","*"),window.parent!==window&&window.parent.postMessage("relay:close","*"),window.opener&&window.opener.postMessage("relay:close","*")},[])}var _jsxruntime = require('react/jsx-runtime');var H={top:0,bottom:0,left:0,right:0},B=_react.createContext.call(void 0, H);function qa({children:r}){let[e,s]=_react.useState.call(void 0, H);return _react.useEffect.call(void 0, ()=>{let c=()=>{let d=getComputedStyle(document.documentElement),u=n=>{let t=d.getPropertyValue(`--safe-area-inset-${n}`);return parseInt(t)||0},l=u("top"),f=u("bottom"),m=u("left"),a=u("right");if(l===0&&f===0){let n=document.createElement("div");n.style.cssText=`
2
+ position: fixed;
3
+ top: env(safe-area-inset-top, 0px);
4
+ bottom: env(safe-area-inset-bottom, 0px);
5
+ left: env(safe-area-inset-left, 0px);
6
+ right: env(safe-area-inset-right, 0px);
7
+ pointer-events: none;
8
+ visibility: hidden;
9
+ `,document.body.appendChild(n);let t=n.getBoundingClientRect();l=t.top,f=window.innerHeight-t.bottom,m=t.left,a=window.innerWidth-t.right,document.body.removeChild(n)}s({top:l,bottom:f,left:m,right:a})},o=d=>{_optionalChain([d, 'access', _10 => _10.data, 'optionalAccess', _11 => _11.type])==="relay:safearea"&&s(d.data.insets)};return c(),window.addEventListener("message",o),window.addEventListener("resize",c),()=>{window.removeEventListener("message",o),window.removeEventListener("resize",c)}},[]),_jsxruntime.jsx.call(void 0, B.Provider,{value:e,children:r})}function R(){return _react.useContext.call(void 0, B)}function za(){let[r,e]=_react.useState.call(void 0, ()=>window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");return _react.useEffect.call(void 0, ()=>{let s=window.matchMedia("(prefers-color-scheme: dark)"),c=o=>{e(o.matches?"dark":"light")};return s.addEventListener("change",c),()=>s.removeEventListener("change",c)},[]),r}function ja(r){_react.useEffect.call(void 0, ()=>{let e=document.querySelector('meta[name="theme-color"]');e||(e=document.createElement("meta"),e.setAttribute("name","theme-color"),document.head.appendChild(e)),e.setAttribute("content",r),_optionalChain([window, 'access', _12 => _12.parent, 'optionalAccess', _13 => _13.postMessage, 'call', _14 => _14({type:"relay:statusbar",color:r},"*")])},[r])}function Wa(r){_react.useEffect.call(void 0, ()=>{let e=c=>{c.data==="relay:back"&&(r()||_optionalChain([window, 'access', _15 => _15.parent, 'optionalAccess', _16 => _16.postMessage, 'call', _17 => _17("relay:close","*")]))},s=c=>{r()&&window.history.pushState(null,"",window.location.href)};return window.history.pushState(null,"",window.location.href),window.addEventListener("message",e),window.addEventListener("popstate",s),()=>{window.removeEventListener("message",e),window.removeEventListener("popstate",s)}},[r])}function Ya(){let[r,e]=_react.useState.call(void 0, "active");return _react.useEffect.call(void 0, ()=>{let s=()=>{e(document.hidden?"background":"active")},c=o=>{o.data==="relay:foreground"&&e("active"),o.data==="relay:background"&&e("background")};return document.addEventListener("visibilitychange",s),window.addEventListener("message",c),()=>{document.removeEventListener("visibilitychange",s),window.removeEventListener("message",c)}},[]),r}function ti({children:r,behavior:e="padding",keyboardVerticalOffset:s=0,style:c,className:o}){let d=L(),u=d.height+s,l={...c,transition:"all 0.2s ease-out"};if(d.isOpen)switch(e){case"padding":l.paddingBottom=u;break;case"height":l.height=`calc(100% - ${u}px)`;break;case"position":l.transform=`translateY(-${u}px)`;break}return _jsxruntime.jsx.call(void 0, "div",{style:l,className:o,children:r})}function oi({children:r,edges:e=["top","bottom","left","right"],style:s,className:c}){let o=R(),d={...s,paddingTop:e.includes("top")?o.top:_optionalChain([s, 'optionalAccess', _18 => _18.paddingTop]),paddingBottom:e.includes("bottom")?o.bottom:_optionalChain([s, 'optionalAccess', _19 => _19.paddingBottom]),paddingLeft:e.includes("left")?o.left:_optionalChain([s, 'optionalAccess', _20 => _20.paddingLeft]),paddingRight:e.includes("right")?o.right:_optionalChain([s, 'optionalAccess', _21 => _21.paddingRight])};return _jsxruntime.jsx.call(void 0, "div",{style:d,className:c,children:r})}function ni({title:r,showBack:e=!0,onBack:s,className:c,rightElement:o}){let d=R();return _jsxruntime.jsx.call(void 0, "div",{className:_chunk7RGKC52Kcjs.a.call(void 0, "bg-background border-b flex flex-col z-50",c),style:{paddingTop:d.top},children:_jsxruntime.jsxs.call(void 0, "div",{className:"h-14 flex items-center justify-between px-4",children:[_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center gap-4 flex-1",children:[e&&_jsxruntime.jsx.call(void 0, "button",{onClick:s||(()=>window.history.back()),className:"p-2 -ml-2 hover:bg-muted rounded-full transition-colors",children:_jsxruntime.jsx.call(void 0, "svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:_jsxruntime.jsx.call(void 0, "path",{d:"M19 12H5M12 19l-7-7 7-7"})})}),_jsxruntime.jsx.call(void 0, "h1",{className:"text-lg font-semibold truncate",children:r})]}),o&&_jsxruntime.jsx.call(void 0, "div",{className:"flex-none",children:o})]})})}function si(){let[r,e]=_react.useState.call(void 0, 1500),[s,c]=_react.useState.call(void 0, 1500),[o,d]=_react.useState.call(void 0, !1),[u,l]=_react.useState.call(void 0, "focus"),[f,m]=_react.useState.call(void 0, ""),[a,n]=_react.useState.call(void 0, "egg"),[t,i]=_react.useState.call(void 0, !1);_react.useEffect.call(void 0, ()=>{let h=null;if(o&&r>0)h=setInterval(()=>{e(w=>w-1)},1e3);else if(r===0&&o&&(d(!1),u==="focus")){let w=Math.random()<.01;n(w?"alien":"chick")}return()=>{h&&clearInterval(h)}},[o,r,u]),_react.useEffect.call(void 0, ()=>{if(!o&&(a==="chick"||a==="alien"||a==="ghost")||u!=="focus")return;let h=1-r/s;h<.5?n("egg"):h>=.5&&h<1&&n("cracked")},[r,s,o,a,u]);let p=()=>d(!o),g=()=>{d(!1),n("ghost")},v=h=>{d(!1),l(h),n("egg");let w=1500;h==="shortBreak"&&(w=300),h==="longBreak"&&(w=900),e(w),c(w)};return{seconds:r,initialTime:s,isActive:o,mode:u,task:f,storyState:a,soundEnabled:t,setSeconds:e,setInitialTime:c,setIsActive:d,setMode:l,setTask:m,setStoryState:n,setSoundEnabled:i,toggleTimer:p,giveUp:g,switchMode:v,resetTimer:()=>{d(!1),v(u)},setCustomTime:h=>{d(!1),e(h*60),c(h*60),n("egg")}}}function di(){let[r,e]=_react.useState.call(void 0, "default");_react.useEffect.call(void 0, ()=>{"Notification"in window&&e(Notification.permission)},[]);let s=_react.useCallback.call(void 0, async()=>{if(!("Notification"in window))return console.warn("Notifications not supported"),"denied";let l=await Notification.requestPermission();return e(l),l},[]),c=_react.useCallback.call(void 0, (l,f)=>{if(!("Notification"in window))return;let m=f;if(!_optionalChain([f, 'optionalAccess', _22 => _22.icon])){let a=document.querySelector('link[rel="apple-touch-icon"]')||document.querySelector('link[rel="icon"]');a&&(m={...f,icon:a.href})}Notification.permission==="granted"?new Notification(l,m):Notification.permission!=="denied"&&Notification.requestPermission().then(a=>{a==="granted"&&new Notification(l,m)})},[]),o=_react.useCallback.call(void 0, (l,f,m)=>{setTimeout(()=>{c(l,m)},f)},[c]),d=_react.useCallback.call(void 0, async l=>{if("setAppBadge"in navigator)try{await navigator.setAppBadge(l)}catch(f){console.error("Error setting badge:",f)}},[]),u=_react.useCallback.call(void 0, async()=>{if("clearAppBadge"in navigator)try{await navigator.clearAppBadge()}catch(l){console.error("Error clearing badge:",l)}},[]);return{permission:r,requestPermission:s,sendNotification:c,scheduleNotification:o,setBadge:d,clearBadge:u}}var A="relay_clipboard_history",Z=10;function pi(){let[r,e]=_react.useState.call(void 0, null),[s,c]=_react.useState.call(void 0, []);_react.useEffect.call(void 0, ()=>{try{let a=localStorage.getItem(A);if(a){let n=JSON.parse(a);c(n)}}catch(a){console.error("Failed to load clipboard history",a)}},[]);let o=_react.useCallback.call(void 0, a=>{c(n=>{let t=[a,...n].slice(0,Z),i=t.filter(p=>p.type==="text");try{localStorage.setItem(A,JSON.stringify(i))}catch(p){console.error("Failed to save clipboard history",p)}return t})},[]),d=_react.useCallback.call(void 0, async a=>{if(!navigator.clipboard){console.warn("Clipboard API not supported");return}try{await navigator.clipboard.writeText(a),e(a),o({type:"text",content:a,timestamp:Date.now()})}catch(n){throw console.error("Failed to copy text:",n),n}},[o]),u=_react.useCallback.call(void 0, async a=>{if(!navigator.clipboard){console.warn("Clipboard API not supported");return}try{await navigator.clipboard.write([new ClipboardItem({[a.type]:a})]),o({type:"image",content:a,timestamp:Date.now()})}catch(n){throw console.error("Failed to copy image:",n),n}},[o]),l=_react.useCallback.call(void 0, async()=>{if(!navigator.clipboard)return console.warn("Clipboard API not supported"),"";try{let a=await navigator.clipboard.readText();return e(a),a}catch(a){throw console.error("Failed to read text:",a),a}},[]),f=_react.useCallback.call(void 0, async()=>{if(!navigator.clipboard)return console.warn("Clipboard API not supported"),[];try{return await navigator.clipboard.read()}catch(a){throw console.error("Failed to read content:",a),a}},[]),m=_react.useCallback.call(void 0, ()=>{c([]),localStorage.removeItem(A)},[]);return _react.useEffect.call(void 0, ()=>{let a=()=>{l().catch(()=>{})};return window.addEventListener("focus",a),()=>window.removeEventListener("focus",a)},[l]),{clipboardContent:r,history:s,copyText:d,copyImage:u,readText:l,readContent:f,clearHistory:m}}function hi(r){let[e,s]=_react.useState.call(void 0, {loading:!0,accuracy:null,altitude:null,altitudeAccuracy:null,heading:null,latitude:null,longitude:null,speed:null,timestamp:null,error:null}),c=_react.useRef.call(void 0, null),o=_react.useCallback.call(void 0, n=>{s({loading:!1,accuracy:n.coords.accuracy,altitude:n.coords.altitude,altitudeAccuracy:n.coords.altitudeAccuracy,heading:n.coords.heading,latitude:n.coords.latitude,longitude:n.coords.longitude,speed:n.coords.speed,timestamp:n.timestamp,error:null})},[]),d=_react.useCallback.call(void 0, n=>{s(t=>({...t,loading:!1,error:n}))},[]),u=_react.useCallback.call(void 0, ()=>{if(!navigator.geolocation){s(n=>({...n,loading:!1,error:{code:0,message:"Geolocation not supported",PERMISSION_DENIED:1,POSITION_UNAVAILABLE:2,TIMEOUT:3}}));return}s(n=>({...n,loading:!0})),navigator.geolocation.getCurrentPosition(o,d,r)},[o,d,r]),l=_react.useCallback.call(void 0, n=>{navigator.geolocation&&(c.current!==null&&navigator.geolocation.clearWatch(c.current),c.current=navigator.geolocation.watchPosition(o,d,n||r))},[o,d,r]),f=_react.useCallback.call(void 0, ()=>{c.current!==null&&(navigator.geolocation.clearWatch(c.current),c.current=null)},[]),m=_react.useCallback.call(void 0, (n,t)=>{if(e.latitude===null||e.longitude===null)return 1/0;let i=6371e3,p=e.latitude*Math.PI/180,g=n*Math.PI/180,v=(n-e.latitude)*Math.PI/180,k=(t-e.longitude)*Math.PI/180,N=Math.sin(v/2)*Math.sin(v/2)+Math.cos(p)*Math.cos(g)*Math.sin(k/2)*Math.sin(k/2),h=2*Math.atan2(Math.sqrt(N),Math.sqrt(1-N));return i*h},[e.latitude,e.longitude]),a=_react.useCallback.call(void 0, n=>m(n.latitude,n.longitude)<=n.radius,[m]);return _react.useEffect.call(void 0, ()=>()=>{c.current!==null&&navigator.geolocation.clearWatch(c.current)},[]),{...e,getLocation:u,watchLocation:l,clearWatch:f,checkGeofence:a,distanceTo:m}}function bi(){let[r,e]=_react.useState.call(void 0, {stream:null,error:null,permission:"unknown",isRecording:!1,devices:[]}),s=_react.useRef.call(void 0, null),c=_react.useRef.call(void 0, []),o=_react.useCallback.call(void 0, async()=>{if(!_optionalChain([navigator, 'access', _23 => _23.mediaDevices, 'optionalAccess', _24 => _24.enumerateDevices]))return[];try{let t=await navigator.mediaDevices.enumerateDevices();return e(i=>({...i,devices:t})),t}catch(t){return console.error("Error enumerating devices:",t),[]}},[]);_react.useEffect.call(void 0, ()=>(o(),_optionalChain([navigator, 'access', _25 => _25.mediaDevices, 'optionalAccess', _26 => _26.addEventListener, 'call', _27 => _27("devicechange",o)]),()=>{_optionalChain([navigator, 'access', _28 => _28.mediaDevices, 'optionalAccess', _29 => _29.removeEventListener, 'call', _30 => _30("devicechange",o)])}),[o]);let d=_react.useCallback.call(void 0, async(t={video:!0,audio:!1})=>{try{let i=await navigator.mediaDevices.getUserMedia(t);return e(p=>({...p,stream:i,error:null,permission:"granted"})),i}catch(i){let p=i;e(g=>({...g,error:p,permission:"denied"})),console.error("Error starting camera:",i)}},[]),u=_react.useCallback.call(void 0, ()=>{r.stream&&(r.stream.getTracks().forEach(t=>t.stop()),e(t=>({...t,stream:null,isRecording:!1})))},[r.stream]),l=_react.useCallback.call(void 0, async(t={video:!0})=>{try{let i=await navigator.mediaDevices.getDisplayMedia(t);return e(p=>({...p,stream:i,error:null,permission:"granted"})),i}catch(i){let p=i;e(g=>({...g,error:p,permission:"denied"})),console.error("Error starting screen share:",i)}},[]),f=_react.useCallback.call(void 0, async()=>{if(!r.stream||!r.stream.getVideoTracks()[0])return;let i=document.createElement("video");i.srcObject=r.stream,await i.play();let p=document.createElement("canvas");p.width=i.videoWidth,p.height=i.videoHeight;let g=p.getContext("2d");if(!g)return;g.drawImage(i,0,0);let v=p.toDataURL("image/png");return i.pause(),i.srcObject=null,v},[r.stream]),m=_react.useCallback.call(void 0, ()=>{if(r.stream)try{let t=new MediaRecorder(r.stream);s.current=t,c.current=[],t.ondataavailable=i=>{i.data.size>0&&c.current.push(i.data)},t.start(),e(i=>({...i,isRecording:!0}))}catch(t){console.error("Error starting recording:",t),e(i=>({...i,error:t}))}},[r.stream]),a=_react.useCallback.call(void 0, async()=>{if(!(!s.current||s.current.state==="inactive"))return new Promise(t=>{s.current&&(s.current.onstop=()=>{let i=new Blob(c.current,{type:"video/webm"});e(p=>({...p,isRecording:!1})),t(i)},s.current.stop())})},[]),n=_react.useCallback.call(void 0, async(t,i)=>{u();let p={[i]:{deviceId:{exact:t}}};await d(p)},[d,u]);return _react.useEffect.call(void 0, ()=>()=>{u()},[]),{...r,startCamera:d,stopCamera:u,takePhoto:f,startRecording:m,stopRecording:a,startScreenShare:l,switchDevice:n,getDevices:o}}function xi(){let[r,e]=_react.useState.call(void 0, !1),[s,c]=_react.useState.call(void 0, !1),[o,d]=_react.useState.call(void 0, []),l=(()=>{if(typeof window>"u")return"http://localhost:5378";let t=window.__RELAY_HELPER_HOST__;if(t)return t;let{protocol:i,hostname:p,port:g}=window.location;return g==="5378"||g==="5379"?"":`${i}//${p}:${i==="https:"?5379:5378}`})(),f=_react.useCallback.call(void 0, async()=>{try{let i=await(await fetch(`${l}/api/config`)).json();e(_nullishCoalesce(_optionalChain([i, 'access', _31 => _31.ollama, 'optionalAccess', _32 => _32.available]), () => (!1)))}catch (e2){e(!1)}},[]),m=_react.useCallback.call(void 0, async()=>{c(!0);try{let t=await fetch(`${l}/api/ollama/api/tags`);if(t.ok){let i=await t.json();d(i.models||[])}}catch(t){console.error("Failed to fetch Ollama models:",t)}finally{c(!1)}},[]);_react.useEffect.call(void 0, ()=>{f();let t=setInterval(f,3e4);return()=>clearInterval(t)},[f]),_react.useEffect.call(void 0, ()=>{r&&m()},[r,m]);let a=_react.useCallback.call(void 0, async(t,i,p={})=>{let g=await fetch(`${l}/api/ollama/api/generate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:t,prompt:i,stream:!1,...p})});if(!g.ok)throw new Error(`Ollama generation failed: ${g.statusText}`);return await g.json()},[]),n=_react.useCallback.call(void 0, async(t,i,p={})=>{let g=await fetch(`${l}/api/ollama/api/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:t,messages:i,stream:!1,...p})});if(!g.ok)throw new Error(`Ollama chat failed: ${g.statusText}`);return await g.json()},[]);return{available:r,loading:s,models:o,refreshModels:m,generate:a,chat:n}}exports.Accordion = _chunk7RGKC52Kcjs.b; exports.AccordionContent = _chunk7RGKC52Kcjs.e; exports.AccordionItem = _chunk7RGKC52Kcjs.c; exports.AccordionTrigger = _chunk7RGKC52Kcjs.d; exports.Alert = _chunk7RGKC52Kcjs.t; exports.AlertAction = _chunk7RGKC52Kcjs.w; exports.AlertDescription = _chunk7RGKC52Kcjs.v; exports.AlertDialog = _chunk7RGKC52Kcjs.h; exports.AlertDialogAction = _chunk7RGKC52Kcjs.r; exports.AlertDialogCancel = _chunk7RGKC52Kcjs.s; exports.AlertDialogContent = _chunk7RGKC52Kcjs.l; exports.AlertDialogDescription = _chunk7RGKC52Kcjs.q; exports.AlertDialogFooter = _chunk7RGKC52Kcjs.n; exports.AlertDialogHeader = _chunk7RGKC52Kcjs.m; exports.AlertDialogMedia = _chunk7RGKC52Kcjs.o; exports.AlertDialogOverlay = _chunk7RGKC52Kcjs.k; exports.AlertDialogPortal = _chunk7RGKC52Kcjs.j; exports.AlertDialogTitle = _chunk7RGKC52Kcjs.p; exports.AlertDialogTrigger = _chunk7RGKC52Kcjs.i; exports.AlertTitle = _chunk7RGKC52Kcjs.u; exports.AspectRatio = _chunk7RGKC52Kcjs.x; exports.Avatar = _chunk7RGKC52Kcjs.y; exports.AvatarBadge = _chunk7RGKC52Kcjs.B; exports.AvatarFallback = _chunk7RGKC52Kcjs.A; exports.AvatarGroup = _chunk7RGKC52Kcjs.C; exports.AvatarGroupCount = _chunk7RGKC52Kcjs.D; exports.AvatarImage = _chunk7RGKC52Kcjs.z; exports.Badge = _chunk7RGKC52Kcjs.F; exports.Breadcrumb = _chunk7RGKC52Kcjs.G; exports.BreadcrumbEllipsis = _chunk7RGKC52Kcjs.M; exports.BreadcrumbItem = _chunk7RGKC52Kcjs.I; exports.BreadcrumbLink = _chunk7RGKC52Kcjs.J; exports.BreadcrumbList = _chunk7RGKC52Kcjs.H; exports.BreadcrumbPage = _chunk7RGKC52Kcjs.K; exports.BreadcrumbSeparator = _chunk7RGKC52Kcjs.L; exports.Button = _chunk7RGKC52Kcjs.g; exports.ButtonGroup = _chunk7RGKC52Kcjs.P; exports.ButtonGroupSeparator = _chunk7RGKC52Kcjs.R; exports.ButtonGroupText = _chunk7RGKC52Kcjs.Q; exports.Calendar = _chunk7RGKC52Kcjs.S; exports.CalendarDayButton = _chunk7RGKC52Kcjs.T; exports.Card = _chunk7RGKC52Kcjs.U; exports.CardAction = _chunk7RGKC52Kcjs.Y; exports.CardContent = _chunk7RGKC52Kcjs.Z; exports.CardDescription = _chunk7RGKC52Kcjs.X; exports.CardFooter = _chunk7RGKC52Kcjs._; exports.CardHeader = _chunk7RGKC52Kcjs.V; exports.CardTitle = _chunk7RGKC52Kcjs.W; exports.Carousel = _chunk7RGKC52Kcjs.aa; exports.CarouselContent = _chunk7RGKC52Kcjs.ba; exports.CarouselItem = _chunk7RGKC52Kcjs.ca; exports.CarouselNext = _chunk7RGKC52Kcjs.ea; exports.CarouselPrevious = _chunk7RGKC52Kcjs.da; exports.ChartContainer = _chunk7RGKC52Kcjs.fa; exports.ChartLegend = _chunk7RGKC52Kcjs.ja; exports.ChartLegendContent = _chunk7RGKC52Kcjs.ka; exports.ChartStyle = _chunk7RGKC52Kcjs.ga; exports.ChartTooltip = _chunk7RGKC52Kcjs.ha; exports.ChartTooltipContent = _chunk7RGKC52Kcjs.ia; exports.Checkbox = _chunk7RGKC52Kcjs.la; exports.Collapsible = _chunk7RGKC52Kcjs.ma; exports.CollapsibleContent = _chunk7RGKC52Kcjs.oa; exports.CollapsibleTrigger = _chunk7RGKC52Kcjs.na; exports.Combobox = _chunk7RGKC52Kcjs.xa; exports.ComboboxChip = _chunk7RGKC52Kcjs.Ka; exports.ComboboxChips = _chunk7RGKC52Kcjs.Ja; exports.ComboboxChipsInput = _chunk7RGKC52Kcjs.La; exports.ComboboxCollection = _chunk7RGKC52Kcjs.Ga; exports.ComboboxContent = _chunk7RGKC52Kcjs.Ba; exports.ComboboxEmpty = _chunk7RGKC52Kcjs.Ha; exports.ComboboxGroup = _chunk7RGKC52Kcjs.Ea; exports.ComboboxInput = _chunk7RGKC52Kcjs.Aa; exports.ComboboxItem = _chunk7RGKC52Kcjs.Da; exports.ComboboxLabel = _chunk7RGKC52Kcjs.Fa; exports.ComboboxList = _chunk7RGKC52Kcjs.Ca; exports.ComboboxSeparator = _chunk7RGKC52Kcjs.Ia; exports.ComboboxTrigger = _chunk7RGKC52Kcjs.za; exports.ComboboxValue = _chunk7RGKC52Kcjs.ya; exports.Command = _chunk7RGKC52Kcjs.Xa; exports.CommandDialog = _chunk7RGKC52Kcjs.Ya; exports.CommandEmpty = _chunk7RGKC52Kcjs.$a; exports.CommandGroup = _chunk7RGKC52Kcjs.ab; exports.CommandInput = _chunk7RGKC52Kcjs.Za; exports.CommandItem = _chunk7RGKC52Kcjs.cb; exports.CommandList = _chunk7RGKC52Kcjs._a; exports.CommandSeparator = _chunk7RGKC52Kcjs.bb; exports.CommandShortcut = _chunk7RGKC52Kcjs.db; exports.ContextMenu = _chunk7RGKC52Kcjs.eb; exports.ContextMenuCheckboxItem = _chunk7RGKC52Kcjs.ob; exports.ContextMenuContent = _chunk7RGKC52Kcjs.kb; exports.ContextMenuGroup = _chunk7RGKC52Kcjs.gb; exports.ContextMenuItem = _chunk7RGKC52Kcjs.lb; exports.ContextMenuLabel = _chunk7RGKC52Kcjs.qb; exports.ContextMenuPortal = _chunk7RGKC52Kcjs.hb; exports.ContextMenuRadioGroup = _chunk7RGKC52Kcjs.jb; exports.ContextMenuRadioItem = _chunk7RGKC52Kcjs.pb; exports.ContextMenuSeparator = _chunk7RGKC52Kcjs.rb; exports.ContextMenuShortcut = _chunk7RGKC52Kcjs.sb; exports.ContextMenuSub = _chunk7RGKC52Kcjs.ib; exports.ContextMenuSubContent = _chunk7RGKC52Kcjs.nb; exports.ContextMenuSubTrigger = _chunk7RGKC52Kcjs.mb; exports.ContextMenuTrigger = _chunk7RGKC52Kcjs.fb; exports.Dialog = _chunk7RGKC52Kcjs.Na; exports.DialogClose = _chunk7RGKC52Kcjs.Qa; exports.DialogContent = _chunk7RGKC52Kcjs.Sa; exports.DialogDescription = _chunk7RGKC52Kcjs.Wa; exports.DialogFooter = _chunk7RGKC52Kcjs.Ua; exports.DialogHeader = _chunk7RGKC52Kcjs.Ta; exports.DialogOverlay = _chunk7RGKC52Kcjs.Ra; exports.DialogPortal = _chunk7RGKC52Kcjs.Pa; exports.DialogTitle = _chunk7RGKC52Kcjs.Va; exports.DialogTrigger = _chunk7RGKC52Kcjs.Oa; exports.Drawer = _chunk7RGKC52Kcjs.tb; exports.DrawerClose = _chunk7RGKC52Kcjs.wb; exports.DrawerContent = _chunk7RGKC52Kcjs.yb; exports.DrawerDescription = _chunk7RGKC52Kcjs.Cb; exports.DrawerFooter = _chunk7RGKC52Kcjs.Ab; exports.DrawerHeader = _chunk7RGKC52Kcjs.zb; exports.DrawerOverlay = _chunk7RGKC52Kcjs.xb; exports.DrawerPortal = _chunk7RGKC52Kcjs.vb; exports.DrawerTitle = _chunk7RGKC52Kcjs.Bb; exports.DrawerTrigger = _chunk7RGKC52Kcjs.ub; exports.DropdownMenu = _chunk7RGKC52Kcjs.Db; exports.DropdownMenuCheckboxItem = _chunk7RGKC52Kcjs.Jb; exports.DropdownMenuContent = _chunk7RGKC52Kcjs.Gb; exports.DropdownMenuGroup = _chunk7RGKC52Kcjs.Hb; exports.DropdownMenuItem = _chunk7RGKC52Kcjs.Ib; exports.DropdownMenuLabel = _chunk7RGKC52Kcjs.Mb; exports.DropdownMenuPortal = _chunk7RGKC52Kcjs.Eb; exports.DropdownMenuRadioGroup = _chunk7RGKC52Kcjs.Kb; exports.DropdownMenuRadioItem = _chunk7RGKC52Kcjs.Lb; exports.DropdownMenuSeparator = _chunk7RGKC52Kcjs.Nb; exports.DropdownMenuShortcut = _chunk7RGKC52Kcjs.Ob; exports.DropdownMenuSub = _chunk7RGKC52Kcjs.Pb; exports.DropdownMenuSubContent = _chunk7RGKC52Kcjs.Rb; exports.DropdownMenuSubTrigger = _chunk7RGKC52Kcjs.Qb; exports.DropdownMenuTrigger = _chunk7RGKC52Kcjs.Fb; exports.Empty = _chunk7RGKC52Kcjs.Sb; exports.EmptyContent = _chunk7RGKC52Kcjs.Xb; exports.EmptyDescription = _chunk7RGKC52Kcjs.Wb; exports.EmptyHeader = _chunk7RGKC52Kcjs.Tb; exports.EmptyMedia = _chunk7RGKC52Kcjs.Ub; exports.EmptyTitle = _chunk7RGKC52Kcjs.Vb; exports.Field = _chunk7RGKC52Kcjs.ac; exports.FieldContent = _chunk7RGKC52Kcjs.bc; exports.FieldDescription = _chunk7RGKC52Kcjs.ec; exports.FieldError = _chunk7RGKC52Kcjs.gc; exports.FieldGroup = _chunk7RGKC52Kcjs.$b; exports.FieldLabel = _chunk7RGKC52Kcjs.cc; exports.FieldLegend = _chunk7RGKC52Kcjs._b; exports.FieldSeparator = _chunk7RGKC52Kcjs.fc; exports.FieldSet = _chunk7RGKC52Kcjs.Zb; exports.FieldTitle = _chunk7RGKC52Kcjs.dc; exports.HoverCard = _chunk7RGKC52Kcjs.hc; exports.HoverCardContent = _chunk7RGKC52Kcjs.jc; exports.HoverCardTrigger = _chunk7RGKC52Kcjs.ic; exports.Input = _chunk7RGKC52Kcjs.pa; exports.InputGroup = _chunk7RGKC52Kcjs.ra; exports.InputGroupAddon = _chunk7RGKC52Kcjs.sa; exports.InputGroupButton = _chunk7RGKC52Kcjs.ta; exports.InputGroupInput = _chunk7RGKC52Kcjs.va; exports.InputGroupText = _chunk7RGKC52Kcjs.ua; exports.InputGroupTextarea = _chunk7RGKC52Kcjs.wa; exports.InputOTP = _chunk7RGKC52Kcjs.kc; exports.InputOTPGroup = _chunk7RGKC52Kcjs.lc; exports.InputOTPSeparator = _chunk7RGKC52Kcjs.nc; exports.InputOTPSlot = _chunk7RGKC52Kcjs.mc; exports.Item = _chunk7RGKC52Kcjs.qc; exports.ItemActions = _chunk7RGKC52Kcjs.vc; exports.ItemContent = _chunk7RGKC52Kcjs.sc; exports.ItemDescription = _chunk7RGKC52Kcjs.uc; exports.ItemFooter = _chunk7RGKC52Kcjs.xc; exports.ItemGroup = _chunk7RGKC52Kcjs.oc; exports.ItemHeader = _chunk7RGKC52Kcjs.wc; exports.ItemMedia = _chunk7RGKC52Kcjs.rc; exports.ItemSeparator = _chunk7RGKC52Kcjs.pc; exports.ItemTitle = _chunk7RGKC52Kcjs.tc; exports.Kbd = _chunk7RGKC52Kcjs.yc; exports.KbdGroup = _chunk7RGKC52Kcjs.zc; exports.KeyboardAvoidingView = ti; exports.Label = _chunk7RGKC52Kcjs.Yb; exports.Menubar = _chunk7RGKC52Kcjs.Ac; exports.MenubarCheckboxItem = _chunk7RGKC52Kcjs.Ic; exports.MenubarContent = _chunk7RGKC52Kcjs.Gc; exports.MenubarGroup = _chunk7RGKC52Kcjs.Cc; exports.MenubarItem = _chunk7RGKC52Kcjs.Hc; exports.MenubarLabel = _chunk7RGKC52Kcjs.Kc; exports.MenubarMenu = _chunk7RGKC52Kcjs.Bc; exports.MenubarPortal = _chunk7RGKC52Kcjs.Dc; exports.MenubarRadioGroup = _chunk7RGKC52Kcjs.Ec; exports.MenubarRadioItem = _chunk7RGKC52Kcjs.Jc; exports.MenubarSeparator = _chunk7RGKC52Kcjs.Lc; exports.MenubarShortcut = _chunk7RGKC52Kcjs.Mc; exports.MenubarSub = _chunk7RGKC52Kcjs.Nc; exports.MenubarSubContent = _chunk7RGKC52Kcjs.Pc; exports.MenubarSubTrigger = _chunk7RGKC52Kcjs.Oc; exports.MenubarTrigger = _chunk7RGKC52Kcjs.Fc; exports.NavigationMenu = _chunk7RGKC52Kcjs.Qc; exports.NavigationMenuContent = _chunk7RGKC52Kcjs.Vc; exports.NavigationMenuIndicator = _chunk7RGKC52Kcjs.Yc; exports.NavigationMenuItem = _chunk7RGKC52Kcjs.Sc; exports.NavigationMenuLink = _chunk7RGKC52Kcjs.Xc; exports.NavigationMenuList = _chunk7RGKC52Kcjs.Rc; exports.NavigationMenuTrigger = _chunk7RGKC52Kcjs.Uc; exports.NavigationMenuViewport = _chunk7RGKC52Kcjs.Wc; exports.Pagination = _chunk7RGKC52Kcjs.Zc; exports.PaginationContent = _chunk7RGKC52Kcjs._c; exports.PaginationEllipsis = _chunk7RGKC52Kcjs.dd; exports.PaginationItem = _chunk7RGKC52Kcjs.$c; exports.PaginationLink = _chunk7RGKC52Kcjs.ad; exports.PaginationNext = _chunk7RGKC52Kcjs.cd; exports.PaginationPrevious = _chunk7RGKC52Kcjs.bd; exports.PlatformHeader = ni; exports.Popover = _chunk7RGKC52Kcjs.ed; exports.PopoverAnchor = _chunk7RGKC52Kcjs.hd; exports.PopoverContent = _chunk7RGKC52Kcjs.gd; exports.PopoverDescription = _chunk7RGKC52Kcjs.kd; exports.PopoverHeader = _chunk7RGKC52Kcjs.id; exports.PopoverTitle = _chunk7RGKC52Kcjs.jd; exports.PopoverTrigger = _chunk7RGKC52Kcjs.fd; exports.Progress = _chunk7RGKC52Kcjs.ld; exports.RadioGroup = _chunk7RGKC52Kcjs.md; exports.RadioGroupItem = _chunk7RGKC52Kcjs.nd; exports.ResizableHandle = _chunk7RGKC52Kcjs.qd; exports.ResizablePanel = _chunk7RGKC52Kcjs.pd; exports.ResizablePanelGroup = _chunk7RGKC52Kcjs.od; exports.SafeAreaProvider = qa; exports.SafeAreaView = oi; exports.ScrollArea = _chunk7RGKC52Kcjs.rd; exports.ScrollBar = _chunk7RGKC52Kcjs.sd; exports.Select = _chunk7RGKC52Kcjs.td; exports.SelectContent = _chunk7RGKC52Kcjs.xd; exports.SelectGroup = _chunk7RGKC52Kcjs.ud; exports.SelectItem = _chunk7RGKC52Kcjs.zd; exports.SelectLabel = _chunk7RGKC52Kcjs.yd; exports.SelectScrollDownButton = _chunk7RGKC52Kcjs.Cd; exports.SelectScrollUpButton = _chunk7RGKC52Kcjs.Bd; exports.SelectSeparator = _chunk7RGKC52Kcjs.Ad; exports.SelectTrigger = _chunk7RGKC52Kcjs.wd; exports.SelectValue = _chunk7RGKC52Kcjs.vd; exports.Separator = _chunk7RGKC52Kcjs.N; exports.Sheet = _chunk7RGKC52Kcjs.Dd; exports.SheetClose = _chunk7RGKC52Kcjs.Fd; exports.SheetContent = _chunk7RGKC52Kcjs.Gd; exports.SheetDescription = _chunk7RGKC52Kcjs.Kd; exports.SheetFooter = _chunk7RGKC52Kcjs.Id; exports.SheetHeader = _chunk7RGKC52Kcjs.Hd; exports.SheetTitle = _chunk7RGKC52Kcjs.Jd; exports.SheetTrigger = _chunk7RGKC52Kcjs.Ed; exports.Sidebar = _chunk7RGKC52Kcjs.Td; exports.SidebarContent = _chunk7RGKC52Kcjs.$d; exports.SidebarFooter = _chunk7RGKC52Kcjs.Zd; exports.SidebarGroup = _chunk7RGKC52Kcjs.ae; exports.SidebarGroupAction = _chunk7RGKC52Kcjs.ce; exports.SidebarGroupContent = _chunk7RGKC52Kcjs.de; exports.SidebarGroupLabel = _chunk7RGKC52Kcjs.be; exports.SidebarHeader = _chunk7RGKC52Kcjs.Yd; exports.SidebarInput = _chunk7RGKC52Kcjs.Xd; exports.SidebarInset = _chunk7RGKC52Kcjs.Wd; exports.SidebarMenu = _chunk7RGKC52Kcjs.ee; exports.SidebarMenuAction = _chunk7RGKC52Kcjs.he; exports.SidebarMenuBadge = _chunk7RGKC52Kcjs.ie; exports.SidebarMenuButton = _chunk7RGKC52Kcjs.ge; exports.SidebarMenuItem = _chunk7RGKC52Kcjs.fe; exports.SidebarMenuSkeleton = _chunk7RGKC52Kcjs.je; exports.SidebarMenuSub = _chunk7RGKC52Kcjs.ke; exports.SidebarMenuSubButton = _chunk7RGKC52Kcjs.me; exports.SidebarMenuSubItem = _chunk7RGKC52Kcjs.le; exports.SidebarProvider = _chunk7RGKC52Kcjs.Sd; exports.SidebarRail = _chunk7RGKC52Kcjs.Vd; exports.SidebarSeparator = _chunk7RGKC52Kcjs._d; exports.SidebarTrigger = _chunk7RGKC52Kcjs.Ud; exports.Skeleton = _chunk7RGKC52Kcjs.Ld; exports.Slider = _chunk7RGKC52Kcjs.ne; exports.Spinner = _chunk7RGKC52Kcjs.pe; exports.Switch = _chunk7RGKC52Kcjs.qe; exports.Table = _chunk7RGKC52Kcjs.re; exports.TableBody = _chunk7RGKC52Kcjs.te; exports.TableCaption = _chunk7RGKC52Kcjs.ye; exports.TableCell = _chunk7RGKC52Kcjs.xe; exports.TableFooter = _chunk7RGKC52Kcjs.ue; exports.TableHead = _chunk7RGKC52Kcjs.we; exports.TableHeader = _chunk7RGKC52Kcjs.se; exports.TableRow = _chunk7RGKC52Kcjs.ve; exports.Tabs = _chunk7RGKC52Kcjs.ze; exports.TabsContent = _chunk7RGKC52Kcjs.De; exports.TabsList = _chunk7RGKC52Kcjs.Be; exports.TabsTrigger = _chunk7RGKC52Kcjs.Ce; exports.Textarea = _chunk7RGKC52Kcjs.qa; exports.Toaster = _chunk7RGKC52Kcjs.oe; exports.Toggle = _chunk7RGKC52Kcjs.Fe; exports.ToggleGroup = _chunk7RGKC52Kcjs.Ge; exports.ToggleGroupItem = _chunk7RGKC52Kcjs.He; exports.Tooltip = _chunk7RGKC52Kcjs.Nd; exports.TooltipContent = _chunk7RGKC52Kcjs.Pd; exports.TooltipProvider = _chunk7RGKC52Kcjs.Md; exports.TooltipTrigger = _chunk7RGKC52Kcjs.Od; exports.badgeVariants = _chunk7RGKC52Kcjs.E; exports.buttonGroupVariants = _chunk7RGKC52Kcjs.O; exports.buttonVariants = _chunk7RGKC52Kcjs.f; exports.cn = _chunk7RGKC52Kcjs.a; exports.navigationMenuTriggerStyle = _chunk7RGKC52Kcjs.Tc; exports.tabsListVariants = _chunk7RGKC52Kcjs.Ae; exports.toggleVariants = _chunk7RGKC52Kcjs.Ee; exports.useAppState = Ya; exports.useBackHandler = Wa; exports.useCamera = bi; exports.useCarousel = _chunk7RGKC52Kcjs.$; exports.useClipboard = pi; exports.useColorScheme = za; exports.useComboboxAnchor = _chunk7RGKC52Kcjs.Ma; exports.useFocusTimer = si; exports.useGeolocation = hi; exports.useIsMobile = _chunk7RGKC52Kcjs.Qd; exports.useKeyboard = L; exports.useNotifications = di; exports.useOllama = xi; exports.useRelayClose = Va; exports.useSafeArea = R; exports.useSidebar = _chunk7RGKC52Kcjs.Rd; exports.useStatusBar = ja;
10
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/jas/Desktop/relay/sdk/dist/index.cjs","../src/hooks/use-keyboard.ts","../src/hooks/use-platform.tsx","../src/hooks/use-notifications.ts"],"names":["useKeyboard","state","setState","useState","maxHeight","useRef","useEffect","updateKeyboardState","viewport","currentHeight","keyboardHeight","isOpen","handleOrientationChange","handleFocusIn","e","target","handleFocusOut","useRelayClose","useCallback","defaultInsets","SafeAreaContext","createContext","SafeAreaProvider","children","insets","setInsets","computeInsets","style","getEnv","name","value"],"mappings":"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","file":"/Users/jas/Desktop/relay/sdk/dist/index.cjs","sourcesContent":[null,"import { useState, useEffect, useCallback, useRef } from 'react';\n\ninterface KeyboardState {\n isOpen: boolean;\n height: number;\n}\n\n/**\n * useKeyboard - Track virtual keyboard state on mobile devices\n * \n * Uses visualViewport API to detect keyboard height and provides\n * a safe area offset for positioning UI elements above the keyboard.\n * \n * @returns {KeyboardState} - { isOpen: boolean, height: number }\n */\nexport function useKeyboard(): KeyboardState {\n const [state, setState] = useState<KeyboardState>({\n isOpen: false,\n height: 0\n });\n\n // Track maximum height to detect resizing keyboards\n const maxHeight = useRef(typeof window !== 'undefined' ? window.innerHeight : 0);\n\n useEffect(() => {\n // Check if we're on a mobile device\n const isMobile = /iPad|iPhone|iPod|Android/.test(navigator.userAgent);\n if (!isMobile) return;\n\n const updateKeyboardState = () => {\n if (!window.visualViewport) return;\n\n const viewport = window.visualViewport;\n const currentHeight = window.innerHeight;\n\n // Update baseline if window grows (keyboard closed or orientation change)\n if (currentHeight > maxHeight.current) {\n maxHeight.current = currentHeight;\n }\n\n // 1. Check for overlay keyboard (viewport shrinks, window stays same)\n // This happens on iOS by default\n let keyboardHeight = currentHeight - viewport.height;\n\n // 2. Check for resizing keyboard (window shrinks)\n // This happens on Android and iOS with interactive-widget=resizes-content\n if (keyboardHeight <= 0) {\n keyboardHeight = maxHeight.current - currentHeight;\n }\n\n // Consider keyboard open if height is more than 100px\n const isOpen = keyboardHeight > 100;\n\n setState({\n isOpen,\n height: isOpen ? keyboardHeight : 0\n });\n };\n\n // Listen to visualViewport changes\n if (window.visualViewport) {\n window.visualViewport.addEventListener('resize', updateKeyboardState);\n window.visualViewport.addEventListener('scroll', updateKeyboardState);\n }\n\n // Handle orientation changes to reset baseline\n const handleOrientationChange = () => {\n // Small delay to let resize happen\n setTimeout(() => {\n maxHeight.current = window.innerHeight;\n updateKeyboardState();\n }, 100);\n };\n\n window.addEventListener('orientationchange', handleOrientationChange);\n if (window.screen?.orientation) {\n window.screen.orientation.addEventListener('change', handleOrientationChange);\n }\n\n // Also listen for focus/blur on inputs as fallback\n const handleFocusIn = (e: FocusEvent) => {\n const target = e.target as HTMLElement;\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA') {\n // Small delay to let keyboard animate\n setTimeout(updateKeyboardState, 100);\n }\n };\n\n const handleFocusOut = () => {\n // Small delay to let keyboard animate closed\n setTimeout(() => {\n setState({ isOpen: false, height: 0 });\n }, 100);\n };\n\n document.addEventListener('focusin', handleFocusIn);\n document.addEventListener('focusout', handleFocusOut);\n\n // Initial check\n updateKeyboardState();\n\n return () => {\n window.visualViewport?.removeEventListener('resize', updateKeyboardState);\n window.visualViewport?.removeEventListener('scroll', updateKeyboardState);\n document.removeEventListener('focusin', handleFocusIn);\n document.removeEventListener('focusout', handleFocusOut);\n };\n }, []);\n\n return state;\n}\n\n/**\n * useRelayClose - Get the close function for closing the current app\n * \n * Works with both iframe and blob URL contexts.\n * \n * @returns {() => void} - Function to close the current app\n */\nexport function useRelayClose(): () => void {\n const close = useCallback(() => {\n // 1. PostMessage to self (works in Relay Shell with direct rendering)\n window.postMessage('relay:close', '*');\n\n // 2. PostMessage to parent (works in iframe)\n if (window.parent !== window) {\n window.parent.postMessage('relay:close', '*');\n }\n\n // 3. PostMessage with opener (works if opened as popup)\n if (window.opener) {\n window.opener.postMessage('relay:close', '*');\n }\n }, []);\n\n return close;\n}\n","import { useState, useEffect, useCallback, createContext, useContext, ReactNode } from 'react';\n\n// ============================================\n// SAFE AREA TYPES & CONTEXT\n// ============================================\n\nexport interface SafeAreaInsets {\n top: number;\n bottom: number;\n left: number;\n right: number;\n}\n\nconst defaultInsets: SafeAreaInsets = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0\n};\n\nconst SafeAreaContext = createContext<SafeAreaInsets>(defaultInsets);\n\n// ============================================\n// SAFE AREA PROVIDER\n// ============================================\n\ninterface SafeAreaProviderProps {\n children: ReactNode;\n}\n\n/**\n * SafeAreaProvider - Provides safe area insets to child components\n * \n * Automatically detects safe areas from:\n * 1. CSS env() values (iOS Safari)\n * 2. Parent Shell postMessage (when running in Relay Shell)\n */\nexport function SafeAreaProvider({ children }: SafeAreaProviderProps) {\n const [insets, setInsets] = useState<SafeAreaInsets>(defaultInsets);\n\n useEffect(() => {\n // Method 1: Read from CSS env() values\n const computeInsets = () => {\n const style = getComputedStyle(document.documentElement);\n const getEnv = (name: string) => {\n const value = style.getPropertyValue(`--safe-area-inset-${name}`);\n return parseInt(value) || 0;\n };\n\n // Try to get from CSS custom properties first\n let top = getEnv('top');\n let bottom = getEnv('bottom');\n let left = getEnv('left');\n let right = getEnv('right');\n\n // If CSS props not set, try to read from env() directly\n if (top === 0 && bottom === 0) {\n // Create a temp element to measure env() values\n const temp = document.createElement('div');\n temp.style.cssText = `\n position: fixed;\n top: env(safe-area-inset-top, 0px);\n bottom: env(safe-area-inset-bottom, 0px);\n left: env(safe-area-inset-left, 0px);\n right: env(safe-area-inset-right, 0px);\n pointer-events: none;\n visibility: hidden;\n `;\n document.body.appendChild(temp);\n const rect = temp.getBoundingClientRect();\n top = rect.top;\n bottom = window.innerHeight - rect.bottom;\n left = rect.left;\n right = window.innerWidth - rect.right;\n document.body.removeChild(temp);\n }\n\n setInsets({ top, bottom, left, right });\n };\n\n // Method 2: Listen for Shell messages\n const handleMessage = (event: MessageEvent) => {\n if (event.data?.type === 'relay:safearea') {\n setInsets(event.data.insets);\n }\n };\n\n computeInsets();\n window.addEventListener('message', handleMessage);\n window.addEventListener('resize', computeInsets);\n\n return () => {\n window.removeEventListener('message', handleMessage);\n window.removeEventListener('resize', computeInsets);\n };\n }, []);\n\n return (\n <SafeAreaContext.Provider value={insets}>\n {children}\n </SafeAreaContext.Provider>\n );\n}\n\n// ============================================\n// SAFE AREA HOOKS\n// ============================================\n\n/**\n * useSafeArea - Get safe area insets\n * \n * @returns SafeAreaInsets with top, bottom, left, right values in pixels\n */\nexport function useSafeArea(): SafeAreaInsets {\n return useContext(SafeAreaContext);\n}\n\n// ============================================\n// COLOR SCHEME\n// ============================================\n\nexport type ColorScheme = 'light' | 'dark';\n\n/**\n * useColorScheme - Get current system color scheme\n * \n * @returns 'light' | 'dark'\n */\nexport function useColorScheme(): ColorScheme {\n const [scheme, setScheme] = useState<ColorScheme>(() =>\n window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'\n );\n\n useEffect(() => {\n const media = window.matchMedia('(prefers-color-scheme: dark)');\n const handler = (e: MediaQueryListEvent) => {\n setScheme(e.matches ? 'dark' : 'light');\n };\n media.addEventListener('change', handler);\n return () => media.removeEventListener('change', handler);\n }, []);\n\n return scheme;\n}\n\n// ============================================\n// STATUS BAR\n// ============================================\n\n/**\n * useStatusBar - Control the status bar appearance\n * \n * @param color - Hex color for the status bar\n */\nexport function useStatusBar(color: string): void {\n useEffect(() => {\n // Update meta theme-color\n let meta = document.querySelector('meta[name=\"theme-color\"]');\n if (!meta) {\n meta = document.createElement('meta');\n meta.setAttribute('name', 'theme-color');\n document.head.appendChild(meta);\n }\n meta.setAttribute('content', color);\n\n // Notify parent Shell\n window.parent?.postMessage({ type: 'relay:statusbar', color }, '*');\n }, [color]);\n}\n\n// ============================================\n// BACK HANDLER\n// ============================================\n\n/**\n * useBackHandler - Handle back navigation\n * \n * @param handler - Return true to prevent default back behavior\n */\nexport function useBackHandler(handler: () => boolean): void {\n useEffect(() => {\n const handleMessage = (event: MessageEvent) => {\n if (event.data === 'relay:back') {\n const handled = handler();\n if (!handled) {\n // Allow default close behavior\n window.parent?.postMessage('relay:close', '*');\n }\n }\n };\n\n // Also handle browser back button\n const handlePopState = (event: PopStateEvent) => {\n const handled = handler();\n if (handled) {\n // Push a dummy state to prevent navigation\n window.history.pushState(null, '', window.location.href);\n }\n };\n\n // Push initial state for popstate handling\n window.history.pushState(null, '', window.location.href);\n\n window.addEventListener('message', handleMessage);\n window.addEventListener('popstate', handlePopState);\n\n return () => {\n window.removeEventListener('message', handleMessage);\n window.removeEventListener('popstate', handlePopState);\n };\n }, [handler]);\n}\n\n// ============================================\n// APP STATE\n// ============================================\n\nexport type AppState = 'active' | 'background' | 'inactive';\n\n/**\n * useAppState - Track app foreground/background state\n * \n * @returns Current app state\n */\nexport function useAppState(): AppState {\n const [state, setState] = useState<AppState>('active');\n\n useEffect(() => {\n const handleVisibility = () => {\n setState(document.hidden ? 'background' : 'active');\n };\n\n const handleMessage = (event: MessageEvent) => {\n if (event.data === 'relay:foreground') setState('active');\n if (event.data === 'relay:background') setState('background');\n };\n\n document.addEventListener('visibilitychange', handleVisibility);\n window.addEventListener('message', handleMessage);\n\n return () => {\n document.removeEventListener('visibilitychange', handleVisibility);\n window.removeEventListener('message', handleMessage);\n };\n }, []);\n\n return state;\n}\n","import { useState, useCallback, useEffect } from 'react';\n\nexport interface NotificationOptions {\n body?: string;\n icon?: string;\n image?: string;\n badge?: string;\n tag?: string;\n data?: any;\n vibrate?: number[];\n timestamp?: number;\n renotify?: boolean;\n silent?: boolean;\n requireInteraction?: boolean;\n actions?: NotificationAction[];\n}\n\nexport interface NotificationAction {\n action: string;\n title: string;\n icon?: string;\n}\n\nexport interface UseNotificationsReturn {\n permission: NotificationPermission;\n requestPermission: () => Promise<NotificationPermission>;\n sendNotification: (title: string, options?: NotificationOptions) => void;\n scheduleNotification: (title: string, delayMs: number, options?: NotificationOptions) => void;\n clearBadge: () => Promise<void>;\n setBadge: (count: number) => Promise<void>;\n}\n\nexport function useNotifications(): UseNotificationsReturn {\n const [permission, setPermission] = useState<NotificationPermission>('default');\n\n useEffect(() => {\n if ('Notification' in window) {\n setPermission(Notification.permission);\n }\n }, []);\n\n const requestPermission = useCallback(async () => {\n if (!('Notification' in window)) {\n console.warn('Notifications not supported');\n return 'denied';\n }\n const perm = await Notification.requestPermission();\n setPermission(perm);\n return perm;\n }, []);\n\n const sendNotification = useCallback((title: string, options?: NotificationOptions) => {\n if (!('Notification' in window)) return;\n \n // Auto-detect icon if not provided\n let notificationOptions = options;\n if (!options?.icon) {\n // Try to find apple-touch-icon or shortcut icon\n const iconLink = document.querySelector('link[rel=\"apple-touch-icon\"]') || \n document.querySelector('link[rel=\"icon\"]');\n if (iconLink) {\n notificationOptions = {\n ...options,\n icon: (iconLink as HTMLLinkElement).href\n };\n }\n }\n\n if (Notification.permission === 'granted') {\n new Notification(title, notificationOptions);\n } else if (Notification.permission !== 'denied') {\n Notification.requestPermission().then((perm) => {\n if (perm === 'granted') {\n new Notification(title, notificationOptions);\n }\n });\n }\n }, []);\n\n const scheduleNotification = useCallback((title: string, delayMs: number, options?: NotificationOptions) => {\n setTimeout(() => {\n sendNotification(title, options);\n }, delayMs);\n }, [sendNotification]);\n\n const setBadge = useCallback(async (count: number) => {\n if ('setAppBadge' in navigator) {\n try {\n await (navigator as any).setAppBadge(count);\n } catch (e) {\n console.error('Error setting badge:', e);\n }\n }\n }, []);\n\n const clearBadge = useCallback(async () => {\n if ('clearAppBadge' in navigator) {\n try {\n await (navigator as any).clearAppBadge();\n } catch (e) {\n console.error('Error clearing badge:', e);\n }\n }\n }, []);\n\n return {\n permission,\n requestPermission,\n sendNotification,\n scheduleNotification,\n setBadge,\n clearBadge\n };\n}\n"]}
@@ -0,0 +1,294 @@
1
+ import { ClassValue } from 'clsx';
2
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonGroupVariants, buttonVariants, navigationMenuTriggerStyle, tabsListVariants, toggleVariants, useCarousel, useComboboxAnchor, useSidebar } from './components/ui/index.cjs';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import * as React from 'react';
5
+ import { ReactNode, CSSProperties } from 'react';
6
+ import 'radix-ui';
7
+ import 'class-variance-authority/types';
8
+ import 'class-variance-authority';
9
+ import 'react-day-picker';
10
+ import 'embla-carousel-react';
11
+ import 'recharts';
12
+ import '@base-ui/react';
13
+ import 'cmdk';
14
+ import 'vaul';
15
+ import 'input-otp';
16
+ import 'sonner';
17
+
18
+ declare function cn(...inputs: ClassValue[]): string;
19
+
20
+ type KeyboardBehavior = 'padding' | 'height' | 'position';
21
+ interface KeyboardAvoidingViewProps {
22
+ children: ReactNode;
23
+ behavior?: KeyboardBehavior;
24
+ keyboardVerticalOffset?: number;
25
+ style?: CSSProperties;
26
+ className?: string;
27
+ }
28
+ /**
29
+ * KeyboardAvoidingView - Automatically adjusts content when keyboard opens
30
+ *
31
+ * @param behavior - How to adjust: 'padding' | 'height' | 'position'
32
+ * @param keyboardVerticalOffset - Additional offset to add
33
+ */
34
+ declare function KeyboardAvoidingView({ children, behavior, keyboardVerticalOffset, style, className }: KeyboardAvoidingViewProps): react_jsx_runtime.JSX.Element;
35
+ type SafeAreaEdge = 'top' | 'bottom' | 'left' | 'right';
36
+ interface SafeAreaViewProps {
37
+ children: ReactNode;
38
+ edges?: SafeAreaEdge[];
39
+ style?: CSSProperties;
40
+ className?: string;
41
+ }
42
+ /**
43
+ * SafeAreaView - Container that respects safe area insets
44
+ *
45
+ * @param edges - Which edges to apply safe area to (default: all)
46
+ */
47
+ declare function SafeAreaView({ children, edges, style, className }: SafeAreaViewProps): react_jsx_runtime.JSX.Element;
48
+ interface PlatformHeaderProps {
49
+ title: string;
50
+ showBack?: boolean;
51
+ onBack?: () => void;
52
+ className?: string;
53
+ rightElement?: ReactNode;
54
+ }
55
+ declare function PlatformHeader({ title, showBack, onBack, className, rightElement }: PlatformHeaderProps): react_jsx_runtime.JSX.Element;
56
+
57
+ type TimerMode = 'focus' | 'shortBreak' | 'longBreak';
58
+ type StoryState = 'egg' | 'cracked' | 'chick' | 'alien' | 'ghost';
59
+ declare function useFocusTimer(): {
60
+ seconds: number;
61
+ initialTime: number;
62
+ isActive: boolean;
63
+ mode: TimerMode;
64
+ task: string;
65
+ storyState: StoryState;
66
+ soundEnabled: boolean;
67
+ setSeconds: React.Dispatch<React.SetStateAction<number>>;
68
+ setInitialTime: React.Dispatch<React.SetStateAction<number>>;
69
+ setIsActive: React.Dispatch<React.SetStateAction<boolean>>;
70
+ setMode: React.Dispatch<React.SetStateAction<TimerMode>>;
71
+ setTask: React.Dispatch<React.SetStateAction<string>>;
72
+ setStoryState: React.Dispatch<React.SetStateAction<StoryState>>;
73
+ setSoundEnabled: React.Dispatch<React.SetStateAction<boolean>>;
74
+ toggleTimer: () => void;
75
+ giveUp: () => void;
76
+ switchMode: (newMode: TimerMode) => void;
77
+ resetTimer: () => void;
78
+ setCustomTime: (mins: number) => void;
79
+ };
80
+
81
+ declare function useIsMobile(): boolean;
82
+
83
+ interface KeyboardState {
84
+ isOpen: boolean;
85
+ height: number;
86
+ }
87
+ /**
88
+ * useKeyboard - Track virtual keyboard state on mobile devices
89
+ *
90
+ * Uses visualViewport API to detect keyboard height and provides
91
+ * a safe area offset for positioning UI elements above the keyboard.
92
+ *
93
+ * @returns {KeyboardState} - { isOpen: boolean, height: number }
94
+ */
95
+ declare function useKeyboard(): KeyboardState;
96
+ /**
97
+ * useRelayClose - Get the close function for closing the current app
98
+ *
99
+ * Works with both iframe and blob URL contexts.
100
+ *
101
+ * @returns {() => void} - Function to close the current app
102
+ */
103
+ declare function useRelayClose(): () => void;
104
+
105
+ interface SafeAreaInsets {
106
+ top: number;
107
+ bottom: number;
108
+ left: number;
109
+ right: number;
110
+ }
111
+ interface SafeAreaProviderProps {
112
+ children: ReactNode;
113
+ }
114
+ /**
115
+ * SafeAreaProvider - Provides safe area insets to child components
116
+ *
117
+ * Automatically detects safe areas from:
118
+ * 1. CSS env() values (iOS Safari)
119
+ * 2. Parent Shell postMessage (when running in Relay Shell)
120
+ */
121
+ declare function SafeAreaProvider({ children }: SafeAreaProviderProps): react_jsx_runtime.JSX.Element;
122
+ /**
123
+ * useSafeArea - Get safe area insets
124
+ *
125
+ * @returns SafeAreaInsets with top, bottom, left, right values in pixels
126
+ */
127
+ declare function useSafeArea(): SafeAreaInsets;
128
+ type ColorScheme = 'light' | 'dark';
129
+ /**
130
+ * useColorScheme - Get current system color scheme
131
+ *
132
+ * @returns 'light' | 'dark'
133
+ */
134
+ declare function useColorScheme(): ColorScheme;
135
+ /**
136
+ * useStatusBar - Control the status bar appearance
137
+ *
138
+ * @param color - Hex color for the status bar
139
+ */
140
+ declare function useStatusBar(color: string): void;
141
+ /**
142
+ * useBackHandler - Handle back navigation
143
+ *
144
+ * @param handler - Return true to prevent default back behavior
145
+ */
146
+ declare function useBackHandler(handler: () => boolean): void;
147
+ type AppState = 'active' | 'background' | 'inactive';
148
+ /**
149
+ * useAppState - Track app foreground/background state
150
+ *
151
+ * @returns Current app state
152
+ */
153
+ declare function useAppState(): AppState;
154
+
155
+ interface NotificationOptions {
156
+ body?: string;
157
+ icon?: string;
158
+ image?: string;
159
+ badge?: string;
160
+ tag?: string;
161
+ data?: any;
162
+ vibrate?: number[];
163
+ timestamp?: number;
164
+ renotify?: boolean;
165
+ silent?: boolean;
166
+ requireInteraction?: boolean;
167
+ actions?: NotificationAction[];
168
+ }
169
+ interface NotificationAction {
170
+ action: string;
171
+ title: string;
172
+ icon?: string;
173
+ }
174
+ interface UseNotificationsReturn {
175
+ permission: NotificationPermission;
176
+ requestPermission: () => Promise<NotificationPermission>;
177
+ sendNotification: (title: string, options?: NotificationOptions) => void;
178
+ scheduleNotification: (title: string, delayMs: number, options?: NotificationOptions) => void;
179
+ clearBadge: () => Promise<void>;
180
+ setBadge: (count: number) => Promise<void>;
181
+ }
182
+ declare function useNotifications(): UseNotificationsReturn;
183
+
184
+ interface ClipboardItem {
185
+ type: 'text' | 'image' | 'html';
186
+ content: string | Blob;
187
+ timestamp: number;
188
+ }
189
+ interface UseClipboardReturn {
190
+ clipboardContent: string | null;
191
+ history: ClipboardItem[];
192
+ copyText: (text: string) => Promise<void>;
193
+ copyImage: (blob: Blob) => Promise<void>;
194
+ readText: () => Promise<string>;
195
+ readContent: () => Promise<ClipboardItems>;
196
+ clearHistory: () => void;
197
+ }
198
+ declare function useClipboard(): UseClipboardReturn;
199
+
200
+ interface LocationState {
201
+ loading: boolean;
202
+ accuracy: number | null;
203
+ altitude: number | null;
204
+ altitudeAccuracy: number | null;
205
+ heading: number | null;
206
+ latitude: number | null;
207
+ longitude: number | null;
208
+ speed: number | null;
209
+ timestamp: number | null;
210
+ error: GeolocationPositionError | null;
211
+ }
212
+ interface Geofence {
213
+ id: string;
214
+ latitude: number;
215
+ longitude: number;
216
+ radius: number;
217
+ }
218
+ interface UseGeolocationReturn extends LocationState {
219
+ getLocation: () => void;
220
+ watchLocation: (options?: PositionOptions) => void;
221
+ clearWatch: () => void;
222
+ checkGeofence: (fence: Geofence) => boolean;
223
+ distanceTo: (lat: number, lng: number) => number;
224
+ }
225
+ declare function useGeolocation(options?: PositionOptions): UseGeolocationReturn;
226
+
227
+ interface CameraState {
228
+ stream: MediaStream | null;
229
+ error: Error | null;
230
+ permission: PermissionState | 'unknown';
231
+ isRecording: boolean;
232
+ devices: MediaDeviceInfo[];
233
+ }
234
+ interface CameraOptions {
235
+ video?: boolean | MediaTrackConstraints;
236
+ audio?: boolean | MediaTrackConstraints;
237
+ }
238
+ interface UseCameraReturn extends CameraState {
239
+ startCamera: (options?: CameraOptions) => Promise<MediaStream | undefined>;
240
+ stopCamera: () => void;
241
+ takePhoto: () => Promise<string | undefined>;
242
+ startRecording: () => void;
243
+ stopRecording: () => Promise<Blob | undefined>;
244
+ startScreenShare: (options?: DisplayMediaStreamOptions) => Promise<MediaStream | undefined>;
245
+ switchDevice: (deviceId: string, kind: 'video' | 'audio') => Promise<void>;
246
+ getDevices: () => Promise<MediaDeviceInfo[]>;
247
+ }
248
+ declare function useCamera(): UseCameraReturn;
249
+
250
+ interface OllamaModel {
251
+ name: string;
252
+ modified_at: string;
253
+ size: number;
254
+ digest: string;
255
+ details: {
256
+ parent_model: string;
257
+ format: string;
258
+ family: string;
259
+ families: string[];
260
+ parameter_size: string;
261
+ quantization_level: string;
262
+ };
263
+ }
264
+ interface OllamaResponse {
265
+ model: string;
266
+ created_at: string;
267
+ response?: string;
268
+ message?: {
269
+ role: string;
270
+ content: string;
271
+ };
272
+ done: boolean;
273
+ context?: number[];
274
+ total_duration?: number;
275
+ load_duration?: number;
276
+ prompt_eval_count?: number;
277
+ prompt_eval_duration?: number;
278
+ eval_count?: number;
279
+ eval_duration?: number;
280
+ }
281
+ interface UseOllamaReturn {
282
+ available: boolean;
283
+ loading: boolean;
284
+ models: OllamaModel[];
285
+ refreshModels: () => Promise<void>;
286
+ generate: (model: string, prompt: string, options?: any) => Promise<OllamaResponse>;
287
+ chat: (model: string, messages: {
288
+ role: string;
289
+ content: string;
290
+ }[], options?: any) => Promise<OllamaResponse>;
291
+ }
292
+ declare function useOllama(): UseOllamaReturn;
293
+
294
+ export { type AppState, type CameraOptions, type CameraState, type ClipboardItem, type ColorScheme, type Geofence, KeyboardAvoidingView, type LocationState, type NotificationAction, type NotificationOptions, type OllamaModel, type OllamaResponse, PlatformHeader, type SafeAreaInsets, SafeAreaProvider, SafeAreaView, type StoryState, type TimerMode, type UseCameraReturn, type UseClipboardReturn, type UseGeolocationReturn, type UseNotificationsReturn, type UseOllamaReturn, cn, useAppState, useBackHandler, useCamera, useClipboard, useColorScheme, useFocusTimer, useGeolocation, useIsMobile, useKeyboard, useNotifications, useOllama, useRelayClose, useSafeArea, useStatusBar };