@buoy-gg/shared-ui 7.0.84 → 7.0.86

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.
Files changed (42) hide show
  1. package/lib/commonjs/JsModal.js +1 -1
  2. package/lib/commonjs/JsModal.web.js +1 -1
  3. package/lib/commonjs/index.js +1 -1
  4. package/lib/commonjs/license/AccountSetupContent.js +1 -1
  5. package/lib/commonjs/license/index.js +1 -1
  6. package/lib/commonjs/license/licenseModule.js +1 -1
  7. package/lib/commonjs/license/releaseSimulation.js +1 -0
  8. package/lib/commonjs/license/tierLimits.js +1 -1
  9. package/lib/commonjs/ui/floating/FloatingTool.js +1 -1
  10. package/lib/commonjs/ui/floating/FloatingTool.web.js +1 -1
  11. package/lib/module/JsModal.js +1 -1
  12. package/lib/module/JsModal.web.js +1 -1
  13. package/lib/module/index.js +1 -1
  14. package/lib/module/license/AccountSetupContent.js +1 -1
  15. package/lib/module/license/index.js +1 -1
  16. package/lib/module/license/licenseModule.js +1 -1
  17. package/lib/module/license/releaseSimulation.js +1 -0
  18. package/lib/module/license/tierLimits.js +1 -1
  19. package/lib/module/ui/floating/FloatingTool.js +1 -1
  20. package/lib/module/ui/floating/FloatingTool.web.js +1 -1
  21. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  22. package/lib/typescript/commonjs/index.d.ts +3 -2
  23. package/lib/typescript/commonjs/license/AccountSetupContent.d.ts +3 -1
  24. package/lib/typescript/commonjs/license/index.d.ts +1 -1
  25. package/lib/typescript/commonjs/license/licenseModule.d.ts +11 -2
  26. package/lib/typescript/commonjs/license/releaseSimulation.d.ts +27 -0
  27. package/lib/typescript/commonjs/utils/stateSnapshotRegistry.d.ts +5 -0
  28. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  29. package/lib/typescript/module/index.d.ts +3 -2
  30. package/lib/typescript/module/license/AccountSetupContent.d.ts +3 -1
  31. package/lib/typescript/module/license/index.d.ts +1 -1
  32. package/lib/typescript/module/license/licenseModule.d.ts +11 -2
  33. package/lib/typescript/module/license/releaseSimulation.d.ts +27 -0
  34. package/lib/typescript/module/utils/stateSnapshotRegistry.d.ts +5 -0
  35. package/lib/web/chunks/{chunk-T44OT3CI.mjs → chunk-MGKPQCZU.mjs} +4 -4
  36. package/lib/web/chunks/chunk-TWVTG6LD.mjs +1 -0
  37. package/lib/web/dataViewer.mjs +1 -1
  38. package/lib/web/floating.mjs +1 -1
  39. package/lib/web/index.mjs +11 -11
  40. package/lib/web/ui.mjs +1 -1
  41. package/package.json +5 -5
  42. package/lib/web/chunks/chunk-4YLP5MMN.mjs +0 -1
@@ -1 +1 @@
1
- "use strict";import{BuoyPortal as dt}from"./portalHost.web.js";import{night as k}from"../night/nightTheme.js";import{useState as Y,useRef as y,useCallback as M,useEffect as m,useMemo as J,Children as Q}from"react";import{calculateTargetPosition as ct}from"./onboardingConstants.web.js";import{useFloatingTools as ut,FloatingToolsProvider as gt,useFloatingToolsContext as pt,interleaveWithDividers as ft,floatingToolsColors as p,withAlpha as v,getUserStatusConfig as mt,getGripIconLayout as ht,interpolatePosition as bt,easing as wt,VISIBLE_HANDLE_WIDTH as Z,ANIMATION_DURATION as yt}from"@buoy-gg/floating-tools-react/floating";import{jsx as d,jsxs as $}from"react/jsx-runtime";const D=10;const tt=20;function W(){if(typeof document==="undefined"||!document.body)return{top:0,left:0,bottom:0};const e=document.createElement("div");e.style.cssText="position:fixed;top:0;left:0;visibility:hidden;pointer-events:none;padding-top:env(safe-area-inset-top);padding-left:env(safe-area-inset-left);padding-bottom:env(safe-area-inset-bottom)";document.body.appendChild(e);const s=getComputedStyle(e);const r={top:parseFloat(s.paddingTop)||0,left:parseFloat(s.paddingLeft)||0,bottom:parseFloat(s.paddingBottom)||0};document.body.removeChild(e);return r}const j={getItem:e=>localStorage.getItem(e),setItem:(e,s)=>localStorage.setItem(e,s)};const et="#A0A0A0";function xt({size:e=24,color:s=v(et,"CC")}){const r=ht(e);return d("div",{style:{width:e,height:e,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},children:[0,1].map(c=>d("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",marginLeft:r.columnGap/2,marginRight:r.columnGap/2},children:[0,1,2].map(h=>d("div",{style:{width:r.dotSize,height:r.dotSize,borderRadius:r.dotSize/2,backgroundColor:s,marginTop:r.rowGap/2,marginBottom:r.rowGap/2}},h))},c))})}export function Divider(){return d("div",{style:{width:1,height:12,backgroundColor:v(p.muted,"66"),flexShrink:0}})}const vt={success:p.success,optional:p.optional,muted:p.muted,secondary:et};export function UserStatus({userRole:e,onPress:s}){const{isDragging:r}=pt();const c=mt(e,vt);const h=b=>{if(!r&&s){b.stopPropagation();b.currentTarget.focus();s()}};return $("button",{role:"button","aria-label":s?"Open Dev Tools Menu":`User status: ${c.label}`,"data-testid":s?"open-dev-tools-button":void 0,onClick:h,style:{display:"flex",flexDirection:"row",alignItems:"center",paddingTop:6,paddingBottom:6,paddingLeft:8,paddingRight:8,flexShrink:0,cursor:s&&!r?"pointer":"default",background:"none",border:"none",margin:0},children:[d("div",{style:{width:6,height:6,borderRadius:3,backgroundColor:c.dotColor,marginRight:4}}),d("span",{style:{fontSize:10,fontWeight:500,color:c.textColor,letterSpacing:.3,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',lineHeight:"normal"},children:c.label})]})}function Dt(){const e=y(null);const[s,r]=Y({x:0,y:0});const c=M((h,b,R)=>{if(e.current){cancelAnimationFrame(e.current)}const F=performance.now();const H=S=>{const x=S-F;const A=Math.min(x/yt,1);const E=bt(h,b,A,wt.easeOutCubic);r(E);if(A<1){e.current=requestAnimationFrame(H)}else{r(b);R?.()}};e.current=requestAnimationFrame(H)},[]);m(()=>{return()=>{if(e.current){cancelAnimationFrame(e.current)}}},[]);return{position:s,setPosition:r,animateTo:c}}let ot=null;export function getBubbleAnchorPosition(){return ot}export function FloatingTool({id:e,revealToken:s,variant:r="bubble",dragFromSurface:c=false,defaultPlacement:h="top",accessibilityLabel:b="Drag handle",accessory:R,handleAdornment:F,enablePositionPersistence:H=true,children:S,pushToSide:x=false,suspendPointerEvents:A=false,centerOnboarding:E=false,minimizedStack:O,hasMinimizedStack:X=false}){const w=y(null);const nt=J(()=>e?{getItem:t=>j.getItem(`@buoy/floating-tool/${e}/${t}`),setItem:(t,i)=>j.setItem(`@buoy/floating-tool/${e}/${t}`,i)}:j,[e]);const{state:o,actions:n,isInitialized:u}=ut({screenSize:{width:window.innerWidth,height:window.innerHeight},enablePositionPersistence:H,storage:nt,...h==="bottom"?{initialBubbleSize:{width:100,height:48},initialPosition:{x:window.innerWidth-100-D,y:Math.max(W().top+tt,window.innerHeight-48-W().bottom-D)}}:{}});const{position:g,setPosition:T,animateTo:f}=Dt();m(()=>{if(u){T(o.position)}},[u,o.position,T]);m(()=>{if(!e)ot={x:g.x,y:g.y}},[g,e]);m(()=>{if(!u)return;const t=()=>{const l=w.current?.getBoundingClientRect();if(l&&l.width>0&&l.height>0)n.setBubbleSize({width:l.width,height:l.height})};const i=()=>{const l=W().bottom;n.setScreenSize(window.innerWidth,window.innerHeight-(l>0?l-D:0));t()};t();const a=typeof ResizeObserver!=="undefined"?new ResizeObserver(t):null;if(w.current)a?.observe(w.current);window.addEventListener("resize",i);return()=>{a?.disconnect();window.removeEventListener("resize",i)}},[n,u]);const[it,rt]=Y(0);m(()=>{let t=false;const i=()=>{const a=W();rt(a.top);if(a.top>0||a.left>0||a.bottom>0){t=true;n.setMinPosition({x:a.left,y:a.top+tt});n.setScreenSize(window.innerWidth,window.innerHeight-(a.bottom>0?a.bottom-D:0))}else if(t){t=false;n.setMinPosition({x:D,y:D});n.setScreenSize(window.innerWidth,window.innerHeight)}};i();window.addEventListener("resize",i);return()=>window.removeEventListener("resize",i)},[n]);const[U,V]=Y(false);const q=M(t=>{t.stopPropagation();t.preventDefault();V(true);n.handleDragStart({clientX:t.clientX,clientY:t.clientY})},[n]);const G=y(false);const st=t=>{if(t.button!==0||!(t.target instanceof Element))return;if(t.target.closest('button, a, input, select, textarea, [role="button"], [role="switch"], [role="slider"], [role="checkbox"], [role="radio"], [contenteditable="true"], [data-floating-accessory]'))return;G.current=true;q(t)};const _=M(t=>{const i=n.handleDragMove({clientX:t.clientX,clientY:t.clientY});if(i.isDragging){T(i.position)}},[n,T]);const C=M(t=>{V(false);const i=n.handleDragEnd({clientX:t.clientX,clientY:t.clientY});const a=G.current;G.current=false;if(i.wasTap&&!a){const l=n.toggleHideShow();f(o.position,l.targetPosition,()=>{n.commitPosition(l.targetPosition)})}else if(i.shouldHide){f(o.position,i.position,()=>{n.commitPosition(i.position)})}},[n,f,o.position]);m(()=>{if(U){window.addEventListener("pointermove",_);window.addEventListener("pointerup",C);window.addEventListener("pointercancel",C);return()=>{window.removeEventListener("pointermove",_);window.removeEventListener("pointerup",C);window.removeEventListener("pointercancel",C)}}},[U,_,C]);const z=y(o.position);z.current=o.position;const N=y(o.isHidden);N.current=o.isHidden;const B=y(false);m(()=>{if(!u)return;if(x&&!B.current){if(N.current)return;B.current=true;const{targetPosition:t}=n.forceHide();f(z.current,t,()=>{})}else if(!x&&B.current){B.current=false;if(!N.current)return;const{targetPosition:t}=n.forceShow();const i=w.current?.getBoundingClientRect().width??100;const a={x:Math.max(10,Math.min(t.x,window.innerWidth-i-10)),y:t.y};f(z.current,a,()=>{n.commitPosition(a)})}},[x,u]);m(()=>{if(!E||!u)return;const t=w.current?.getBoundingClientRect().width??100;const i=w.current?.getBoundingClientRect().height??32;const a=ct();const l={x:(window.innerWidth-t)/2,y:window.innerHeight-a-i};f(z.current,l,()=>{})},[E,u]);const K=y(void 0);m(()=>{if(!u||K.current===s)return;K.current=s;if(s!==void 0&&s>0&&o.isHidden){const{targetPosition:t}=n.forceShow();f(o.position,t,()=>n.commitPosition(t))}},[s,u,o.isHidden,o.position,n,f]);const at=J(()=>r==="strip"?Q.toArray(S):ft(Q.toArray(S),t=>d(Divider,{},t)),[S,r]);if(!u){return null}const I=Math.max(0,g.y-it-8);const L=Math.max(0,window.innerHeight-g.y-o.bubbleSize.height-8);const lt=I>L;const P=I>=48||I>=L;return $("div",{ref:w,"data-testid":e??"buoy-floating-tool",role:"toolbar","aria-label":"Floating Tools",onPointerDown:c?st:void 0,style:{position:"fixed",left:g.x,top:g.y,zIndex:x?8999:9999,display:"flex",flexDirection:"row",alignItems:"center",backgroundColor:p.panel,borderTopLeftRadius:X?0:6,borderTopRightRadius:6,borderBottomLeftRadius:6,borderBottomRightRadius:6,borderWidth:o.isDragging?2:1,borderTopWidth:o.isDragging?2:X?0:1,borderStyle:"solid",borderColor:o.isDragging?p.dragActive:v(p.muted,"66"),boxShadow:o.isDragging?`0 6px 12px ${v(p.dragActive,.36)}`:"0 4px 8px rgba(0, 0, 0, 0.3)",cursor:c?o.isDragging?"grabbing":"grab":void 0,userSelect:"none",touchAction:"none",pointerEvents:A?"none":"auto",...r==="strip"?{borderRadius:k.radius.card,minHeight:48,backgroundColor:k.color.surface,borderColor:o.isDragging?k.color.accentBorderStrong:k.color.separator,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.24)"}:{}},children:[O&&d(dt,{children:d("div",{style:{position:"fixed",top:P?g.y:g.y+o.bubbleSize.height,transform:P?"translateY(-100%)":void 0,"--buoy-stack-bottom":P?"0px":"auto","--buoy-stack-top":P?"auto":"0px","--buoy-stack-space":`${P?I:L}px`,left:g.x-1,width:Z,overflow:"visible",zIndex:1e4,pointerEvents:A?"none":"auto"},children:O})}),$("div",{role:"button","aria-label":b,"data-testid":e?`${e}-grip`:"buoy-floating-grip",tabIndex:0,onPointerDown:q,onKeyDown:t=>{if(t.key!=="Enter"&&t.key!==" ")return;t.preventDefault();const i=n.toggleHideShow();f(o.position,i.targetPosition,()=>n.commitPosition(i.targetPosition))},style:{touchAction:"none",paddingLeft:6,paddingRight:6,paddingTop:6,paddingBottom:6,backgroundColor:v(p.muted,"1A"),display:"flex",alignItems:"center",justifyContent:"center",width:Z,boxSizing:"border-box",borderRight:`1px solid ${v(p.muted,"66")}`,cursor:o.isDragging?"grabbing":"grab",...r==="strip"?{minHeight:48,backgroundColor:"transparent",borderRight:"none",flexDirection:"column"}:{}},children:[d(xt,{size:r==="strip"?20:12}),F]}),d(gt,{value:{isDragging:o.isDragging,isHidden:o.isHidden},children:d("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:6,paddingRight:8},children:at})}),!o.isHidden&&R&&d("div",{"data-floating-accessory":true,style:{position:"absolute",...lt?{bottom:"100%"}:{top:"100%"},left:0,width:"100%",maxHeight:Math.max(I,L),overflowY:"auto",zIndex:1002},children:R})]})}
1
+ "use strict";import{BuoyPortal as dt}from"./portalHost.web.js";import{night as k}from"../night/nightTheme.js";import{useState as N,useRef as y,useCallback as M,useEffect as m,useMemo as J,Children as Q}from"react";import{calculateTargetPosition as ct}from"./onboardingConstants.web.js";import{useFloatingTools as ut,FloatingToolsProvider as gt,useFloatingToolsContext as pt,interleaveWithDividers as ft,floatingToolsColors as p,withAlpha as v,getUserStatusConfig as mt,getGripIconLayout as bt,interpolatePosition as ht,easing as wt,VISIBLE_HANDLE_WIDTH as Z,ANIMATION_DURATION as yt}from"@buoy-gg/floating-tools-react/floating";import{jsx as d,jsxs as Y}from"react/jsx-runtime";const D=10;const tt=20;function W(){if(typeof document==="undefined"||!document.body)return{top:0,left:0,bottom:0};const e=document.createElement("div");e.style.cssText="position:fixed;top:0;left:0;visibility:hidden;pointer-events:none;padding-top:env(safe-area-inset-top);padding-left:env(safe-area-inset-left);padding-bottom:env(safe-area-inset-bottom)";document.body.appendChild(e);const s=getComputedStyle(e);const r={top:parseFloat(s.paddingTop)||0,left:parseFloat(s.paddingLeft)||0,bottom:parseFloat(s.paddingBottom)||0};document.body.removeChild(e);return r}const j={getItem:e=>localStorage.getItem(e),setItem:(e,s)=>localStorage.setItem(e,s)};const et="#A0A0A0";function xt({size:e=24,color:s=v(et,"CC")}){const r=bt(e);return d("div",{style:{width:e,height:e,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},children:[0,1].map(c=>d("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",marginLeft:r.columnGap/2,marginRight:r.columnGap/2},children:[0,1,2].map(b=>d("div",{style:{width:r.dotSize,height:r.dotSize,borderRadius:r.dotSize/2,backgroundColor:s,marginTop:r.rowGap/2,marginBottom:r.rowGap/2}},b))},c))})}export function Divider(){return d("div",{style:{width:1,height:12,backgroundColor:v(p.muted,"66"),flexShrink:0}})}const vt={success:p.success,optional:p.optional,muted:p.muted,secondary:et};export function UserStatus({userRole:e,onPress:s}){const{isDragging:r}=pt();const c=mt(e,vt);const b=h=>{if(!r&&s){h.stopPropagation();h.currentTarget.focus();s()}};return Y("button",{role:"button","aria-label":s?`${c.label}, Open Dev Tools Menu`:`User status: ${c.label}`,"data-testid":s?"open-dev-tools-button":void 0,onClick:b,style:{display:"flex",flexDirection:"row",alignItems:"center",paddingTop:6,paddingBottom:6,paddingLeft:8,paddingRight:8,flexShrink:0,cursor:s&&!r?"pointer":"default",background:"none",border:"none",margin:0},children:[d("div",{style:{width:6,height:6,borderRadius:3,backgroundColor:c.dotColor,marginRight:4}}),d("span",{style:{fontSize:10,fontWeight:500,color:c.textColor,letterSpacing:.3,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',lineHeight:"normal"},children:c.label})]})}function Dt(){const e=y(null);const[s,r]=N({x:0,y:0});const c=M((b,h,R)=>{if(e.current){cancelAnimationFrame(e.current)}const F=performance.now();const H=S=>{const x=S-F;const A=Math.min(x/yt,1);const E=ht(b,h,A,wt.easeOutCubic);r(E);if(A<1){e.current=requestAnimationFrame(H)}else{r(h);R?.()}};e.current=requestAnimationFrame(H)},[]);m(()=>{return()=>{if(e.current){cancelAnimationFrame(e.current)}}},[]);return{position:s,setPosition:r,animateTo:c}}let ot=null;export function getBubbleAnchorPosition(){return ot}export function FloatingTool({id:e,revealToken:s,variant:r="bubble",dragFromSurface:c=false,defaultPlacement:b="top",accessibilityLabel:h="Drag handle",accessory:R,handleAdornment:F,enablePositionPersistence:H=true,children:S,pushToSide:x=false,suspendPointerEvents:A=false,centerOnboarding:E=false,minimizedStack:O,hasMinimizedStack:X=false}){const w=y(null);const nt=J(()=>e?{getItem:t=>j.getItem(`@buoy/floating-tool/${e}/${t}`),setItem:(t,i)=>j.setItem(`@buoy/floating-tool/${e}/${t}`,i)}:j,[e]);const{state:o,actions:n,isInitialized:u}=ut({screenSize:{width:window.innerWidth,height:window.innerHeight},enablePositionPersistence:H,storage:nt,...b==="bottom"?{initialBubbleSize:{width:100,height:48},initialPosition:{x:window.innerWidth-100-D,y:Math.max(W().top+tt,window.innerHeight-48-W().bottom-D)}}:{}});const{position:g,setPosition:T,animateTo:f}=Dt();m(()=>{if(u){T(o.position)}},[u,o.position,T]);m(()=>{if(!e)ot={x:g.x,y:g.y}},[g,e]);m(()=>{if(!u)return;const t=()=>{const l=w.current?.getBoundingClientRect();if(l&&l.width>0&&l.height>0)n.setBubbleSize({width:l.width,height:l.height})};const i=()=>{const l=W().bottom;n.setScreenSize(window.innerWidth,window.innerHeight-(l>0?l-D:0));t()};t();const a=typeof ResizeObserver!=="undefined"?new ResizeObserver(t):null;if(w.current)a?.observe(w.current);window.addEventListener("resize",i);return()=>{a?.disconnect();window.removeEventListener("resize",i)}},[n,u]);const[it,rt]=N(0);m(()=>{let t=false;const i=()=>{const a=W();rt(a.top);if(a.top>0||a.left>0||a.bottom>0){t=true;n.setMinPosition({x:a.left,y:a.top+tt});n.setScreenSize(window.innerWidth,window.innerHeight-(a.bottom>0?a.bottom-D:0))}else if(t){t=false;n.setMinPosition({x:D,y:D});n.setScreenSize(window.innerWidth,window.innerHeight)}};i();window.addEventListener("resize",i);return()=>window.removeEventListener("resize",i)},[n]);const[U,V]=N(false);const q=M(t=>{t.stopPropagation();t.preventDefault();V(true);n.handleDragStart({clientX:t.clientX,clientY:t.clientY})},[n]);const G=y(false);const st=t=>{if(t.button!==0||!(t.target instanceof Element))return;if(t.target.closest('button, a, input, select, textarea, [role="button"], [role="switch"], [role="slider"], [role="checkbox"], [role="radio"], [contenteditable="true"], [data-floating-accessory]'))return;G.current=true;q(t)};const _=M(t=>{const i=n.handleDragMove({clientX:t.clientX,clientY:t.clientY});if(i.isDragging){T(i.position)}},[n,T]);const C=M(t=>{V(false);const i=n.handleDragEnd({clientX:t.clientX,clientY:t.clientY});const a=G.current;G.current=false;if(i.wasTap&&!a){const l=n.toggleHideShow();f(o.position,l.targetPosition,()=>{n.commitPosition(l.targetPosition)})}else if(i.shouldHide){f(o.position,i.position,()=>{n.commitPosition(i.position)})}},[n,f,o.position]);m(()=>{if(U){window.addEventListener("pointermove",_);window.addEventListener("pointerup",C);window.addEventListener("pointercancel",C);return()=>{window.removeEventListener("pointermove",_);window.removeEventListener("pointerup",C);window.removeEventListener("pointercancel",C)}}},[U,_,C]);const z=y(o.position);z.current=o.position;const $=y(o.isHidden);$.current=o.isHidden;const B=y(false);m(()=>{if(!u)return;if(x&&!B.current){if($.current)return;B.current=true;const{targetPosition:t}=n.forceHide();f(z.current,t,()=>{})}else if(!x&&B.current){B.current=false;if(!$.current)return;const{targetPosition:t}=n.forceShow();const i=w.current?.getBoundingClientRect().width??100;const a={x:Math.max(10,Math.min(t.x,window.innerWidth-i-10)),y:t.y};f(z.current,a,()=>{n.commitPosition(a)})}},[x,u]);m(()=>{if(!E||!u)return;const t=w.current?.getBoundingClientRect().width??100;const i=w.current?.getBoundingClientRect().height??32;const a=ct();const l={x:(window.innerWidth-t)/2,y:window.innerHeight-a-i};f(z.current,l,()=>{})},[E,u]);const K=y(void 0);m(()=>{if(!u||K.current===s)return;K.current=s;if(s!==void 0&&s>0&&o.isHidden){const{targetPosition:t}=n.forceShow();f(o.position,t,()=>n.commitPosition(t))}},[s,u,o.isHidden,o.position,n,f]);const at=J(()=>r==="strip"?Q.toArray(S):ft(Q.toArray(S),t=>d(Divider,{},t)),[S,r]);if(!u){return null}const I=Math.max(0,g.y-it-8);const L=Math.max(0,window.innerHeight-g.y-o.bubbleSize.height-8);const lt=I>L;const P=I>=48||I>=L;return Y("div",{ref:w,"data-testid":e??"buoy-floating-tool",role:"toolbar","aria-label":"Floating Tools",onPointerDown:c?st:void 0,style:{position:"fixed",left:g.x,top:g.y,zIndex:x?8999:9999,display:"flex",flexDirection:"row",alignItems:"center",backgroundColor:p.panel,borderTopLeftRadius:X?0:6,borderTopRightRadius:6,borderBottomLeftRadius:6,borderBottomRightRadius:6,borderWidth:o.isDragging?2:1,borderTopWidth:o.isDragging?2:X?0:1,borderStyle:"solid",borderColor:o.isDragging?p.dragActive:v(p.muted,"66"),boxShadow:o.isDragging?`0 6px 12px ${v(p.dragActive,.36)}`:"0 4px 8px rgba(0, 0, 0, 0.3)",cursor:c?o.isDragging?"grabbing":"grab":void 0,userSelect:"none",touchAction:"none",pointerEvents:A?"none":"auto",...r==="strip"?{borderRadius:k.radius.card,minHeight:48,backgroundColor:k.color.surface,borderColor:o.isDragging?k.color.accentBorderStrong:k.color.separator,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.24)"}:{}},children:[O&&d(dt,{children:d("div",{style:{position:"fixed",top:P?g.y:g.y+o.bubbleSize.height,transform:P?"translateY(-100%)":void 0,"--buoy-stack-bottom":P?"0px":"auto","--buoy-stack-top":P?"auto":"0px","--buoy-stack-space":`${P?I:L}px`,left:g.x-1,width:Z,overflow:"visible",zIndex:1e4,pointerEvents:A?"none":"auto"},children:O})}),Y("div",{role:"button","aria-label":h,"data-testid":e?`${e}-grip`:"buoy-floating-grip",tabIndex:0,onPointerDown:q,onKeyDown:t=>{if(t.key!=="Enter"&&t.key!==" ")return;t.preventDefault();const i=n.toggleHideShow();f(o.position,i.targetPosition,()=>n.commitPosition(i.targetPosition))},style:{touchAction:"none",paddingLeft:6,paddingRight:6,paddingTop:6,paddingBottom:6,backgroundColor:v(p.muted,"1A"),display:"flex",alignItems:"center",justifyContent:"center",width:Z,boxSizing:"border-box",borderRight:`1px solid ${v(p.muted,"66")}`,cursor:o.isDragging?"grabbing":"grab",...r==="strip"?{minHeight:48,backgroundColor:"transparent",borderRight:"none",flexDirection:"column"}:{}},children:[d(xt,{size:r==="strip"?20:12}),F]}),d(gt,{value:{isDragging:o.isDragging,isHidden:o.isHidden},children:d("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:6,paddingRight:8},children:at})}),!o.isHidden&&R&&d("div",{"data-floating-accessory":true,style:{position:"absolute",...lt?{bottom:"100%"}:{top:"100%"},left:0,width:"100%",maxHeight:Math.max(I,L),overflowY:"auto",zIndex:1002},children:R})]})}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Auto-generated safe area implementation
3
3
  * Detected: none
4
- * Generated at: 2026-11-03T14:41:24.554Z
4
+ * Generated at: 2026-11-05T22:24:00.333Z
5
5
  *
6
6
  * DO NOT EDIT - This file is generated by scripts/detect-safe-area.js
7
7
  *
@@ -52,9 +52,10 @@ export type { Environment } from "./types/types";
52
52
  export { normalizeEnvironment } from "./types/types";
53
53
  export { HintsProvider, useHintsDisabled, useHintsContext } from "./context";
54
54
  export * from "./history";
55
- export { FeatureGate, UpgradePrompt, useFeatureGate, ProFeatureBanner, UpgradeModal, BuoyUpgradeSheet, BuoySignInCard, BuoyNeedsPlanCard, BuoyGetProCard, useSignInState, ProBadge, ProUpgradeModal, FreeAccountPrompt, LOGIN_COMMAND, getUseIsPro, getUseLicense, getUseTier, signOutOfBuoy, TIER_LIMITS, useLimit, resolveEffectiveTier } from "./license";
55
+ export { FeatureGate, UpgradePrompt, useFeatureGate, ProFeatureBanner, UpgradeModal, BuoyUpgradeSheet, BuoySignInCard, BuoyNeedsPlanCard, BuoyGetProCard, useSignInState, ProBadge, ProUpgradeModal, FreeAccountPrompt, LOGIN_COMMAND, getUseIsPro, getUseLicense, getUseTier, signOutOfBuoy, restoreSignedOutKey, TIER_LIMITS, useLimit, resolveEffectiveTier } from "./license";
56
56
  export type { FeatureGateProps, ProFeatureBannerProps, UpgradeModalProps, BuoyUpgradeSheetProps, ProUpgradeModalProps, FreeAccountPromptProps, BuoyTier, TierLimitKey } from "./license";
57
- export { getAccountAccess, hasAccountAccess, assertAccountAccess, subscribeAccountAccess, getUseAccountAccess, retryAccountAccess, isProNow, getTeamCredential } from "./license/licenseModule";
57
+ export { getAccountAccess, hasAccountAccess, assertAccountAccess, isLicensedNow, subscribeAccountAccess, getUseAccountAccess, retryAccountAccess, isProNow, getTeamCredential, getSignInSession } from "./license/licenseModule";
58
+ export { bootBeforeActions, canSimulateInThisBuild, canSimulateNow, isReleaseBuild, isWebRelease, markSimulationSurface, SIMULATION_RELEASE_HELP, simulationSurfacePending, subscribeSimulationSurface } from "./license/releaseSimulation";
58
59
  export { setBuoyAppId, getBuoyAppId } from "./utils/appIdentity";
59
60
  export { guardToolAdapter } from "./sync/toolActionRegistry";
60
61
  export { AccountSetup } from "./license/AccountSetup";
@@ -1,8 +1,10 @@
1
1
  export declare const LOGIN_COMMAND = "npx --package=@buoy-gg/core buoy login";
2
2
  /** Shared account UI; each platform supplies positioning and dismissal. */
3
- export declare function AccountSetupButton({ onPress, expanded, }: {
3
+ export declare function AccountSetupButton({ onPress, expanded, needsPlan, }: {
4
4
  onPress: () => void;
5
5
  expanded?: boolean;
6
+ /** Already signed in, on a plan that can't open Buoy in this build. */
7
+ needsPlan?: boolean;
6
8
  }): import("react").JSX.Element;
7
9
  export declare function AccountSetupCard({ onClose, titleId, }: {
8
10
  onClose: () => void;
@@ -4,7 +4,7 @@ export { BuoyUpgradeSheet, BuoySignInCard, BuoyNeedsPlanCard, BuoyGetProCard, us
4
4
  export type { BuoyUpgradeSheetProps } from "./BuoyUpgradeSheet";
5
5
  export { FreeAccountPrompt, LOGIN_COMMAND } from "./FreeAccountPrompt";
6
6
  export type { FreeAccountPromptProps } from "./FreeAccountPrompt";
7
- export { getUseIsPro, getUseLicense, getUseTier, signOutOfBuoy, } from "./licenseModule";
7
+ export { getUseIsPro, getUseLicense, getUseTier, signOutOfBuoy, restoreSignedOutKey, } from "./licenseModule";
8
8
  export type { BuoyTier } from "./licenseModule";
9
9
  export { TIER_LIMITS, useLimit, resolveEffectiveTier } from "./tierLimits";
10
10
  export type { TierLimitKey } from "./tierLimits";
@@ -42,6 +42,12 @@ export type AccountAccess = {
42
42
  };
43
43
  export declare function getAccountAccess(): AccountAccess;
44
44
  export declare function hasAccountAccess(): boolean;
45
+ /**
46
+ * A real paid plan right now, read outside React. Same answer as `isLicensed`
47
+ * in useProAccess, which decides whether the menu shows in a release build.
48
+ * The Weekend Pass doesn't count.
49
+ */
50
+ export declare function isLicensedNow(): boolean;
45
51
  export declare function assertAccountAccess(): void;
46
52
  export declare function subscribeAccountAccess(listener: () => void): () => void;
47
53
  export declare function getUseAccountAccess(): () => AccountAccess;
@@ -65,6 +71,7 @@ export type SignInSession = {
65
71
  signal?: AbortSignal;
66
72
  }) => Promise<unknown>;
67
73
  signOut(): Promise<void>;
74
+ checkPlan?(minAgeMs?: number): Promise<void>;
68
75
  };
69
76
  /**
70
77
  * "Sign in with Buoy", read when used: Desktop and the website build against a
@@ -72,10 +79,12 @@ export type SignInSession = {
72
79
  */
73
80
  export declare function getSignInSession(): SignInSession | undefined;
74
81
  /**
75
- * Sign out of "Sign in with Buoy" on this device and on buoy.gg. A no-op
76
- * without the license package or without a sign-in.
82
+ * Sign out on this device: the sign-in, also on buoy.gg, and any key. A no-op
83
+ * without the license package or with nothing to sign out of.
77
84
  */
78
85
  export declare function signOutOfBuoy(): Promise<void>;
86
+ /** Go back to the key this device signed out of. False when that didn't work. */
87
+ export declare function restoreSignedOutKey(): Promise<boolean>;
79
88
  /** The token settings sync sends to buoy.gg, or null (signed out, a plain key, or an old license package). */
80
89
  export declare function getSyncCredential(): {
81
90
  token: string;
@@ -0,0 +1,27 @@
1
+ /** How long into a release launch a web call may still wait for the menu. */
2
+ export declare const SURFACE_WAIT_MS = 15000;
3
+ export declare function isReleaseBuild(): boolean;
4
+ /** A release build outside React Native. Nothing is ever faked there. */
5
+ export declare function isWebRelease(): boolean;
6
+ /**
7
+ * Tools set up at import in dev builds, but on first open in release. A scenario
8
+ * or bug case can reach one before that, and its change must really apply. So
9
+ * in a React Native release build, every action sets the tool up first.
10
+ */
11
+ export declare function bootBeforeActions(adapter: {
12
+ actions?: Record<string, (...args: never[]) => unknown>;
13
+ }, boot: () => void): void;
14
+ /** The menu is on screen until the returned function runs. */
15
+ export declare function markSimulationSurface(): () => void;
16
+ export declare function subscribeSimulationSurface(listener: () => void): () => void;
17
+ /**
18
+ * Could the menu still appear this launch, for someone it would show for? Only
19
+ * then may a web call wait for it, so a real user's calls never slow down.
20
+ */
21
+ export declare function simulationSurfacePending(): boolean;
22
+ /** The build's half of the check. Account access is checked as well. */
23
+ export declare function canSimulateInThisBuild(): boolean;
24
+ /** The whole check: account access, plus the build's half. */
25
+ export declare function canSimulateNow(): boolean;
26
+ export declare const SIMULATION_RELEASE_HELP = "A release build needs a paid Buoy plan and the Buoy menu on screen.";
27
+ //# sourceMappingURL=releaseSimulation.d.ts.map
@@ -25,6 +25,11 @@ export interface StateSnapshotCapture {
25
25
  warnings: string[];
26
26
  }
27
27
  export interface StateSnapshotRestoreResult {
28
+ /**
29
+ * Set only with proof that this call changed nothing, like a Redux store that
30
+ * ignored the state jump. A failed result without it may have changed something.
31
+ */
32
+ untouched?: boolean;
28
33
  /** True when the state verifiably changed (or was verified already-equal). */
29
34
  ok: boolean;
30
35
  /** Keys / stores / atoms / queries written. */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Auto-generated safe area implementation
3
3
  * Detected: none
4
- * Generated at: 2026-11-03T14:41:24.554Z
4
+ * Generated at: 2026-11-05T22:24:00.333Z
5
5
  *
6
6
  * DO NOT EDIT - This file is generated by scripts/detect-safe-area.js
7
7
  *
@@ -52,9 +52,10 @@ export type { Environment } from "./types/types";
52
52
  export { normalizeEnvironment } from "./types/types";
53
53
  export { HintsProvider, useHintsDisabled, useHintsContext } from "./context";
54
54
  export * from "./history";
55
- export { FeatureGate, UpgradePrompt, useFeatureGate, ProFeatureBanner, UpgradeModal, BuoyUpgradeSheet, BuoySignInCard, BuoyNeedsPlanCard, BuoyGetProCard, useSignInState, ProBadge, ProUpgradeModal, FreeAccountPrompt, LOGIN_COMMAND, getUseIsPro, getUseLicense, getUseTier, signOutOfBuoy, TIER_LIMITS, useLimit, resolveEffectiveTier } from "./license";
55
+ export { FeatureGate, UpgradePrompt, useFeatureGate, ProFeatureBanner, UpgradeModal, BuoyUpgradeSheet, BuoySignInCard, BuoyNeedsPlanCard, BuoyGetProCard, useSignInState, ProBadge, ProUpgradeModal, FreeAccountPrompt, LOGIN_COMMAND, getUseIsPro, getUseLicense, getUseTier, signOutOfBuoy, restoreSignedOutKey, TIER_LIMITS, useLimit, resolveEffectiveTier } from "./license";
56
56
  export type { FeatureGateProps, ProFeatureBannerProps, UpgradeModalProps, BuoyUpgradeSheetProps, ProUpgradeModalProps, FreeAccountPromptProps, BuoyTier, TierLimitKey } from "./license";
57
- export { getAccountAccess, hasAccountAccess, assertAccountAccess, subscribeAccountAccess, getUseAccountAccess, retryAccountAccess, isProNow, getTeamCredential } from "./license/licenseModule";
57
+ export { getAccountAccess, hasAccountAccess, assertAccountAccess, isLicensedNow, subscribeAccountAccess, getUseAccountAccess, retryAccountAccess, isProNow, getTeamCredential, getSignInSession } from "./license/licenseModule";
58
+ export { bootBeforeActions, canSimulateInThisBuild, canSimulateNow, isReleaseBuild, isWebRelease, markSimulationSurface, SIMULATION_RELEASE_HELP, simulationSurfacePending, subscribeSimulationSurface } from "./license/releaseSimulation";
58
59
  export { setBuoyAppId, getBuoyAppId } from "./utils/appIdentity";
59
60
  export { guardToolAdapter } from "./sync/toolActionRegistry";
60
61
  export { AccountSetup } from "./license/AccountSetup";
@@ -1,8 +1,10 @@
1
1
  export declare const LOGIN_COMMAND = "npx --package=@buoy-gg/core buoy login";
2
2
  /** Shared account UI; each platform supplies positioning and dismissal. */
3
- export declare function AccountSetupButton({ onPress, expanded, }: {
3
+ export declare function AccountSetupButton({ onPress, expanded, needsPlan, }: {
4
4
  onPress: () => void;
5
5
  expanded?: boolean;
6
+ /** Already signed in, on a plan that can't open Buoy in this build. */
7
+ needsPlan?: boolean;
6
8
  }): import("react").JSX.Element;
7
9
  export declare function AccountSetupCard({ onClose, titleId, }: {
8
10
  onClose: () => void;
@@ -4,7 +4,7 @@ export { BuoyUpgradeSheet, BuoySignInCard, BuoyNeedsPlanCard, BuoyGetProCard, us
4
4
  export type { BuoyUpgradeSheetProps } from "./BuoyUpgradeSheet";
5
5
  export { FreeAccountPrompt, LOGIN_COMMAND } from "./FreeAccountPrompt";
6
6
  export type { FreeAccountPromptProps } from "./FreeAccountPrompt";
7
- export { getUseIsPro, getUseLicense, getUseTier, signOutOfBuoy, } from "./licenseModule";
7
+ export { getUseIsPro, getUseLicense, getUseTier, signOutOfBuoy, restoreSignedOutKey, } from "./licenseModule";
8
8
  export type { BuoyTier } from "./licenseModule";
9
9
  export { TIER_LIMITS, useLimit, resolveEffectiveTier } from "./tierLimits";
10
10
  export type { TierLimitKey } from "./tierLimits";
@@ -42,6 +42,12 @@ export type AccountAccess = {
42
42
  };
43
43
  export declare function getAccountAccess(): AccountAccess;
44
44
  export declare function hasAccountAccess(): boolean;
45
+ /**
46
+ * A real paid plan right now, read outside React. Same answer as `isLicensed`
47
+ * in useProAccess, which decides whether the menu shows in a release build.
48
+ * The Weekend Pass doesn't count.
49
+ */
50
+ export declare function isLicensedNow(): boolean;
45
51
  export declare function assertAccountAccess(): void;
46
52
  export declare function subscribeAccountAccess(listener: () => void): () => void;
47
53
  export declare function getUseAccountAccess(): () => AccountAccess;
@@ -65,6 +71,7 @@ export type SignInSession = {
65
71
  signal?: AbortSignal;
66
72
  }) => Promise<unknown>;
67
73
  signOut(): Promise<void>;
74
+ checkPlan?(minAgeMs?: number): Promise<void>;
68
75
  };
69
76
  /**
70
77
  * "Sign in with Buoy", read when used: Desktop and the website build against a
@@ -72,10 +79,12 @@ export type SignInSession = {
72
79
  */
73
80
  export declare function getSignInSession(): SignInSession | undefined;
74
81
  /**
75
- * Sign out of "Sign in with Buoy" on this device and on buoy.gg. A no-op
76
- * without the license package or without a sign-in.
82
+ * Sign out on this device: the sign-in, also on buoy.gg, and any key. A no-op
83
+ * without the license package or with nothing to sign out of.
77
84
  */
78
85
  export declare function signOutOfBuoy(): Promise<void>;
86
+ /** Go back to the key this device signed out of. False when that didn't work. */
87
+ export declare function restoreSignedOutKey(): Promise<boolean>;
79
88
  /** The token settings sync sends to buoy.gg, or null (signed out, a plain key, or an old license package). */
80
89
  export declare function getSyncCredential(): {
81
90
  token: string;
@@ -0,0 +1,27 @@
1
+ /** How long into a release launch a web call may still wait for the menu. */
2
+ export declare const SURFACE_WAIT_MS = 15000;
3
+ export declare function isReleaseBuild(): boolean;
4
+ /** A release build outside React Native. Nothing is ever faked there. */
5
+ export declare function isWebRelease(): boolean;
6
+ /**
7
+ * Tools set up at import in dev builds, but on first open in release. A scenario
8
+ * or bug case can reach one before that, and its change must really apply. So
9
+ * in a React Native release build, every action sets the tool up first.
10
+ */
11
+ export declare function bootBeforeActions(adapter: {
12
+ actions?: Record<string, (...args: never[]) => unknown>;
13
+ }, boot: () => void): void;
14
+ /** The menu is on screen until the returned function runs. */
15
+ export declare function markSimulationSurface(): () => void;
16
+ export declare function subscribeSimulationSurface(listener: () => void): () => void;
17
+ /**
18
+ * Could the menu still appear this launch, for someone it would show for? Only
19
+ * then may a web call wait for it, so a real user's calls never slow down.
20
+ */
21
+ export declare function simulationSurfacePending(): boolean;
22
+ /** The build's half of the check. Account access is checked as well. */
23
+ export declare function canSimulateInThisBuild(): boolean;
24
+ /** The whole check: account access, plus the build's half. */
25
+ export declare function canSimulateNow(): boolean;
26
+ export declare const SIMULATION_RELEASE_HELP = "A release build needs a paid Buoy plan and the Buoy menu on screen.";
27
+ //# sourceMappingURL=releaseSimulation.d.ts.map
@@ -25,6 +25,11 @@ export interface StateSnapshotCapture {
25
25
  warnings: string[];
26
26
  }
27
27
  export interface StateSnapshotRestoreResult {
28
+ /**
29
+ * Set only with proof that this call changed nothing, like a Redux store that
30
+ * ignored the state jump. A failed result without it may have changed something.
31
+ */
32
+ untouched?: boolean;
28
33
  /** True when the state verifiably changed (or was verified already-equal). */
29
34
  ok: boolean;
30
35
  /** Keys / stores / atoms / queries written. */