1import{j as t}from"./index-CxB_Ni1Z-v2.2.0.js";import{a as u}from"./vendor-lucide-C66To_pL-v2.2.0.js";import{s as E,r as M}from"./diagnostics-DhwTGS5A-v2.2.0.js";import"./vendor-react-CXpudY0x-v2.2.0.js";function z(){return typeof window>"u"?"browser":window.navigator.standalone===!0?"standalone":typeof window.matchMedia!="function"?"browser":window.matchMedia("(display-mode: standalone)").matches?"standalone":window.matchMedia("(display-mode: minimal-ui)").matches?"minimal-ui":window.matchMedia("(display-mode: fullscreen)").matches?"fullscreen":"browser"}const D=z();function A(){return D}const j="skettra-diag-hud-pos",g={x:8,y:64},p=(l,d=2)=>l==null||Number.isNaN(l)?"â":l.toFixed(d),n={display:"flex",justifyContent:"space-between",gap:12,lineHeight:1.35},i={color:"rgba(148, 163, 184, 0.65)"},h={color:"#34d399"},c={color:"rgba(148, 163, 184, 0.45)"},T=()=>{const[,l]=u.useState(0);u.useEffect(()=>{let e=0;const a=x=>{M(x),l(m=>(m+1)%1e6),e=requestAnimationFrame(a)};return e=requestAnimationFrame(a),()=>cancelAnimationFrame(e)},[]);const[d,b]=u.useState(()=>{if(typeof window>"u")return g;try{const e=localStorage.getItem(j);if(e){const a=JSON.parse(e);if(typeof a.x=="number"&&typeof a.y=="number")return a}}catch{}return g}),o=u.useRef(null),w=e=>{o.current={startX:e.clientX,startY:e.clientY,origX:d.x,origY:d.y},e.currentTarget.setPointerCapture(e.pointerId),e.stopPropagation()},v=e=>{if(!o.current)return;const a=e.clientX-o.current.startX,x=e.clientY-o.current.startY,m={x:Math.max(-220,Math.min(window.innerWidth-40,o.current.origX+a)),y:Math.max(0,Math.min(window.innerHeight-40,o.current.origY+x))};b(m)},y=e=>{if(o.current){o.current=null;try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}try{localStorage.setItem(j,JSON.stringify(d))}catch{}}},{lastPointer:r,brush:s,fps:S,bakeEvents:R}=E(),f=typeof window<"u"&&window.__SKETTRA_BUILD__||{sha:"unknown",time:"unknown"};return t.jsxs("div",{style:{position:"fixed",top:d.y,left:d.x,width:258,padding:"10px 12px",background:"rgba(15, 23, 42, 0.92)",border:"1px solid rgba(148, 163, 184, 0.25)",borderRadius:8,color:"#e2e8f0",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:11,zIndex:9999,backdropFilter:"blur(6px)",boxShadow:"0 8px 24px rgba(0,0,0,0.35)",touchAction:"none"},"aria-label":"Diagnostics HUD",children:[t.jsxs("div",{style:{...n,marginBottom:6,fontWeight:600,letterSpacing:.3,cursor:"move",userSelect:"none"},onPointerDown:w,onPointerMove:v,onPointerUp:y,onPointerCancel:y,title:"Drag to reposition",children:[t.jsx("span",{children:"â ¿ DIAG"}),t.jsxs("span",{style:i,children:["build ",f.sha," · ",S," fps"]})]}),t.jsxs("div",{style:{...n,...i,fontSize:9,marginBottom:8},children:[t.jsx("span",{children:f.time}),t.jsxs("span",{title:"Live-bake events triggered during the current stroke. Each bake fires when ~150 stamp samples accumulate. Resets on pointerdown.",children:["bakes ",R]})]}),t.jsx("div",{style:{...n,...i,fontSize:9,marginBottom:8},children:t.jsxs("span",{title:"PWA display mode: standalone = launched from Home Screen icon (A2HS); browser = regular Safari tab.",children:["mode: ",A()]})}),t.jsxs("div",{style:{marginBottom:8},children:[t.jsxs("div",{style:{...n,borderBottom:"1px dashed rgba(148,163,184,0.2)",paddingBottom:2,marginBottom:4},children:[t.jsx("span",{style:i,children:"pointer"}),t.jsx("span",{children:(r==null?void 0:r.pointerType)??"â"})]}),r?t.jsxs(t.Fragment,{children:[t.jsxs("div",{style:n,children:[t.jsx("span",{style:i,children:"pressure"}),t.jsx("span",{children:p(r.pressure,3)})]}),t.jsxs("div",{style:n,children:[t.jsx("span",{style:i,children:"tiltX / tiltY"}),t.jsxs("span",{children:[p(r.tiltX,1)," / ",p(r.tiltY,1),"°"]})]}),t.jsxs("div",{style:n,children:[t.jsx("span",{style:i,children:"azimuthAngle"}),t.jsxs("span",{children:[p(r.azimuthAngle,3)," rad"]})]}),t.jsxs("div",{style:n,children:[t.jsx("span",{style:i,children:"â tilt"}),t.jsx("span",{style:r.derivedTilt>.05?h:c,children:p(r.derivedTilt,3)})]}),t.jsxs("div",{style:n,children:[t.jsx("span",{style:i,children:"â azimuth"}),t.jsx("span",{style:r.derivedTilt>
1.05?h:c,children:p(r.derivedAzimuth,3)})]})]}):t.jsx("div",{style:{...n,...i,fontStyle:"italic"},children:t.jsx("span",{children:"no pointer samples yet"})})]}),t.jsxs("div",{children:[t.jsxs("div",{style:{...n,borderBottom:"1px dashed rgba(148,163,184,0.2)",paddingBottom:2,marginBottom:4},children:[t.jsx("span",{style:i,children:"brush"}),t.jsx("span",{children:(s==null?void 0:s.id)??"â"})]}),s?t.jsxs(t.Fragment,{children:[t.jsxs("div",{style:n,children:[t.jsx("span",{style:i,children:"tipRotation"}),t.jsx("span",{children:s.tipRotation})]}),t.jsxs("div",{style:n,children:[t.jsx("span",{style:i,children:"tiltSize"}),t.jsx("span",{style:s.tiltSizeEnabled?h:c,children:s.tiltSizeEnabled?"â authored":"â flat"})]}),t.jsxs("div",{style:n,children:[t.jsx("span",{style:i,children:"tiltOpacity"}),t.jsx("span",{style:s.tiltOpacityEnabled?h:c,children:s.tiltOpacityEnabled?"â authored":"â flat"})]}),t.jsxs("div",{style:n,children:[t.jsx("span",{style:i,children:"tiltRotation"}),s.tipRotation==="tilt"?t.jsx("span",{style:s.tiltRotationEnabled?h:c,children:s.tiltRotationEnabled?"â authored":"â flat"}):t.jsx("span",{style:c,title:"tiltRotation only fires when tipRotation is 'tilt'.",children:"â flat (requires tipRotation: tilt)"})]}),t.jsxs("div",{style:n,children:[t.jsx("span",{style:i,children:"azimuthRotation"}),t.jsx("span",{style:s.azimuthRotationEnabled?h:c,children:s.azimuthRotationEnabled?"â authored":"â flat"})]})]}):t.jsx("div",{style:{...n,...i,fontStyle:"italic"},children:t.jsx("span",{children:"no active brush (not in Studio)"})})]})]})};export{T as DiagnosticsHUD}; 2//# sourceMappingURL=DiagnosticsHUD-DY6NKEEH-v2.2.0.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.