tokentracker-cli 0.49.3 → 0.50.1

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 (46) hide show
  1. package/dashboard/dist/assets/{ActivityHeatmap-DByCSENs.js → ActivityHeatmap-Csg0JY68.js} +1 -1
  2. package/dashboard/dist/assets/{Card-B71GwGxO.js → Card-BDI8Fbh9.js} +1 -1
  3. package/dashboard/dist/assets/DashboardPage-woYtbruG.js +19 -0
  4. package/dashboard/dist/assets/{DevicePage-Cfj34qew.js → DevicePage-EjJbP8Br.js} +1 -1
  5. package/dashboard/dist/assets/{DialogTitle-BdNBXNZX.js → DialogTitle-D66QJAs3.js} +1 -1
  6. package/dashboard/dist/assets/{FadeIn-BuCfpXMc.js → FadeIn-D3DCx8y6.js} +1 -1
  7. package/dashboard/dist/assets/{HeaderGithubStar-DpZhDW9t.js → HeaderGithubStar-DpuKyZW3.js} +1 -1
  8. package/dashboard/dist/assets/{IpCheckPage-DJtvaczo.js → IpCheckPage-Dz3YjhM0.js} +1 -1
  9. package/dashboard/dist/assets/{LandingPage-DVR_EDlv.js → LandingPage-B5UjGCVn.js} +1 -1
  10. package/dashboard/dist/assets/{LeaderboardAvatar-C6KucnuS.js → LeaderboardAvatar-C1HvZXs0.js} +1 -1
  11. package/dashboard/dist/assets/{LeaderboardPage-DKHvUmGb.js → LeaderboardPage-CIp04vrj.js} +3 -3
  12. package/dashboard/dist/assets/{LeaderboardProfileModal-sb4nmMCj.js → LeaderboardProfileModal-BH31dBaK.js} +1 -1
  13. package/dashboard/dist/assets/{LeaderboardProfilePage-BK-1QWfg.js → LeaderboardProfilePage-DpXj5L5i.js} +1 -1
  14. package/dashboard/dist/assets/{LimitsPage-D7m20XVf.js → LimitsPage-DVg3GfTr.js} +1 -1
  15. package/dashboard/dist/assets/{LocalOnlyNotice-DZslFoj5.js → LocalOnlyNotice-BADyYIuM.js} +1 -1
  16. package/dashboard/dist/assets/LoginPage-BId7DDhf.js +1 -0
  17. package/dashboard/dist/assets/{PopoverPopup-BjP_x_N0.js → PopoverPopup-BQhCMi7D.js} +1 -1
  18. package/dashboard/dist/assets/ResetPasswordPage-Bgj2woMZ.js +1 -0
  19. package/dashboard/dist/assets/{Select-B5C3SgjS.js → Select-BRQHUMnI.js} +1 -1
  20. package/dashboard/dist/assets/{SelectItemText-XBZTRfTk.js → SelectItemText-DKPqC7Id.js} +1 -1
  21. package/dashboard/dist/assets/{SettingsPage-C3pgKsph.js → SettingsPage-D7LxfBPd.js} +1 -1
  22. package/dashboard/dist/assets/{SkillsPage-C884cEOL.js → SkillsPage-cFXqx_rg.js} +1 -1
  23. package/dashboard/dist/assets/{WidgetsPage-Wsg4rX9h.js → WidgetsPage-D6wEB36p.js} +1 -1
  24. package/dashboard/dist/assets/{WrappedPage-BSWIQwdE.js → WrappedPage-C6tq3AaH.js} +1 -1
  25. package/dashboard/dist/assets/{agent-logos-umK0ojkk.js → agent-logos-CjZOhWL1.js} +1 -1
  26. package/dashboard/dist/assets/{arrow-up-right-BGMGSKrn.js → arrow-up-right-BVQI0Szz.js} +1 -1
  27. package/dashboard/dist/assets/{download-DBdm8vu1.js → download-45UoPdKK.js} +1 -1
  28. package/dashboard/dist/assets/{info-Dc1md1UE.js → info-ClM58qOx.js} +1 -1
  29. package/dashboard/dist/assets/{main-Br5SsufY.css → main-B1lf1bLt.css} +1 -1
  30. package/dashboard/dist/assets/main-CR3s46Km.js +1009 -0
  31. package/dashboard/dist/assets/{use-limits-display-prefs-yZId6XkL.js → use-limits-display-prefs-Boy1oEqT.js} +1 -1
  32. package/dashboard/dist/assets/{use-native-settings-CquG9vh_.js → use-native-settings-CGKAtYGs.js} +1 -1
  33. package/dashboard/dist/assets/{use-usage-limits-BvhFrG8a.js → use-usage-limits-kGnhUHc-.js} +1 -1
  34. package/dashboard/dist/assets/{useCurrency-DCzLyxzN.js → useCurrency-xorCxnW3.js} +1 -1
  35. package/dashboard/dist/assets/{useScrollLock-C5gi8Y07.js → useScrollLock-B0eyFEUR.js} +1 -1
  36. package/dashboard/dist/index.html +2 -2
  37. package/dashboard/dist/share.html +2 -2
  38. package/package.json +1 -1
  39. package/src/lib/cloud-account.js +58 -7
  40. package/src/lib/local-api.js +6 -1
  41. package/src/lib/pricing/seed-snapshot.json +1 -1
  42. package/src/lib/rollout.js +11 -3
  43. package/src/lib/usage-limits.js +35 -6
  44. package/dashboard/dist/assets/DashboardPage-BjOx4W82.js +0 -19
  45. package/dashboard/dist/assets/LoginPage-HQ8ks6KL.js +0 -1
  46. package/dashboard/dist/assets/main-BTU7nBLK.js +0 -999
@@ -1 +0,0 @@
1
- import{at as K,aJ as Z,Y as ee,r,G as s,j as e,L as V,V as v}from"./main-BTU7nBLK.js";function te(n){const a=new URLSearchParams(n).get("next");return typeof a!="string"||a.length===0||!a.startsWith("/")||a.startsWith("//")?"/dashboard":a}const D={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",linkedin:"LinkedIn",facebook:"Facebook",instagram:"Instagram",tiktok:"TikTok",apple:"Apple",x:"X",spotify:"Spotify"};function $(n){const a=String(n||"").trim();return D[a]?D[a]:a.replace(/-/g," ")}function ie(){const n=K(),[a,A]=Z(),{enabled:o,loading:g,signedIn:f,refreshUser:C,signInWithPassword:E,signUp:M,signInWithOAuth:I,getPublicAuthConfig:F}=ee(),m=r.useMemo(()=>te(a.toString()),[a]),[l,j]=r.useState("signin"),[x,H]=r.useState(""),[h,J]=r.useState(""),[N,Q]=r.useState(""),[k,p]=r.useState(!1),[O,c]=r.useState(null),[U,b]=r.useState(null),[S,B]=r.useState(!0),[_,R]=r.useState([]),[P,T]=r.useState([]),[W,X]=r.useState(8);r.useEffect(()=>{const t=a.get("insforge_status"),i=a.get("insforge_type"),u=a.get("insforge_error");t==="success"&&i==="verify_email"?b(s("login.verify_email_success")):t==="error"&&i==="verify_email"&&u&&b(s("shared.error.prefix",{error:u}))},[a]),r.useEffect(()=>{if(!o){B(!1);return}let t=!0;return(async()=>{const{data:i,error:u}=await F();t&&(u||!i?(R(["google","github"]),T([])):(R(Array.isArray(i.oAuthProviders)?i.oAuthProviders:[]),T(Array.isArray(i.customOAuthProviders)?i.customOAuthProviders:[]),typeof i.passwordMinLength=="number"&&i.passwordMinLength>0&&X(i.passwordMinLength)),B(!1))})(),()=>{t=!1}},[o,F]);const d=r.useMemo(()=>a.get("native")==="1",[a]),y=r.useMemo(()=>a.get("provider")||null,[a]);r.useEffect(()=>{if(!(!o||g)&&f){if(d){window.location.href="/auth/native-callback";return}n(m,{replace:!0})}},[o,g,f,n,m,d]),r.useEffect(()=>{o&&C()},[o,C]);const q=r.useMemo(()=>typeof window>"u"||d?"":`${window.location.origin}/`,[d]),G=r.useMemo(()=>typeof window>"u"?"":`${window.location.origin}/`,[]),Y=r.useCallback(async t=>{t.preventDefault(),c(null),p(!0);try{if(l==="signup"){const{data:u,error:L}=await M({email:x.trim(),password:h,name:N.trim()||void 0,redirectTo:G});if(L){c(L.message||String(L));return}if(u?.requireEmailVerification){b(s("login.verify_email_pending")),j("signin");return}n(m,{replace:!0});return}const{error:i}=await E({email:x.trim(),password:h});if(i){c(i.message||String(i));return}n(m,{replace:!0})}finally{p(!1)}},[l,x,h,N,M,E,n,m,G]),w=r.useCallback(async t=>{c(null),p(!0);try{const{error:i}=await I(t,q);i&&c(i.message||String(i))}finally{p(!1)}},[I,q]);r.useEffect(()=>{if(d&&typeof window<"u")try{window.sessionStorage.setItem("tokentracker_native_login","1")}catch{}},[d]),r.useEffect(()=>{if(!o||g||f||S||!d||!y)return;[..._,...P].includes(y)&&w(y)},[o,g,f,S,d,y,_,P,w]);const z=r.useCallback(()=>{A(t=>{const i=new URLSearchParams(t);return i.delete("insforge_status"),i.delete("insforge_type"),i.delete("insforge_error"),i},{replace:!0}),b(null)},[A]);return o?e.jsxs("div",{className:"min-h-screen bg-oai-gray-950 text-oai-white font-oai antialiased dark flex flex-col",children:[e.jsx("header",{className:"border-b border-oai-gray-900 px-4 sm:px-6 h-16 flex items-center justify-between",children:e.jsx(V,{to:"/",className:"text-sm font-medium text-oai-gray-400 hover:text-white no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 rounded",children:s("login.back_home")})}),e.jsx("main",{className:"flex-1 flex items-center justify-center px-4 py-12",children:e.jsxs("div",{className:"w-full max-w-md space-y-8",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold text-white tracking-tight",children:s("login.title")}),e.jsx("p",{className:"mt-2 text-sm text-oai-gray-500",children:s("login.subtitle")})]}),U?e.jsxs("div",{className:"rounded-lg border border-oai-gray-800 bg-oai-gray-900/50 px-4 py-3 text-sm text-oai-gray-300 flex justify-between gap-3 items-start",role:"status",children:[e.jsx("span",{children:U}),e.jsx("button",{type:"button",onClick:z,className:"shrink-0 text-oai-gray-500 hover:text-white text-xs",children:s("login.dismiss")})]}):null,O?e.jsx("p",{className:"text-sm text-red-400",role:"alert",children:s("shared.error.prefix",{error:O})}):null,e.jsx("div",{className:"space-y-3",children:S?e.jsx("div",{className:"h-11 rounded-lg bg-oai-gray-900 animate-pulse","aria-hidden":!0}):e.jsxs(e.Fragment,{children:[_.map(t=>e.jsx("button",{type:"button",disabled:k,onClick:()=>w(t),className:v("w-full h-11 rounded-lg border border-oai-gray-700 bg-oai-gray-900 text-sm font-medium text-white","hover:bg-oai-gray-800 transition-colors disabled:opacity-50"),children:s("login.oauth.continue",{provider:$(t)})},t)),P.map(t=>e.jsx("button",{type:"button",disabled:k,onClick:()=>w(t),className:v("w-full h-11 rounded-lg border border-oai-gray-700 bg-oai-gray-900 text-sm font-medium text-white","hover:bg-oai-gray-800 transition-colors disabled:opacity-50"),children:s("login.oauth.continue",{provider:$(t)})},t))]})}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 flex items-center","aria-hidden":!0,children:e.jsx("span",{className:"w-full border-t border-oai-gray-800"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:e.jsx("span",{className:"bg-oai-gray-950 px-3 text-oai-gray-600",children:s("login.divider")})})]}),e.jsxs("div",{className:"flex rounded-lg border border-oai-gray-800 p-0.5 bg-oai-gray-900/50",children:[e.jsx("button",{type:"button",className:v("flex-1 py-2 text-sm font-medium rounded-md transition-colors",l==="signin"?"bg-oai-gray-800 text-white":"text-oai-gray-500 hover:text-oai-gray-300"),onClick:()=>{j("signin"),c(null)},children:s("login.tab.sign_in")}),e.jsx("button",{type:"button",className:v("flex-1 py-2 text-sm font-medium rounded-md transition-colors",l==="signup"?"bg-oai-gray-800 text-white":"text-oai-gray-500 hover:text-oai-gray-300"),onClick:()=>{j("signup"),c(null)},children:s("login.tab.sign_up")})]}),e.jsxs("form",{onSubmit:Y,className:"space-y-4",children:[l==="signup"?e.jsxs("div",{children:[e.jsx("label",{htmlFor:"login-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:s("login.field.name")}),e.jsx("input",{id:"login-name",type:"text",autoComplete:"name",value:N,onChange:t=>Q(t.target.value),className:"w-full h-11 rounded-lg border border-oai-gray-800 bg-oai-gray-900 px-3 text-sm text-white placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500",placeholder:s("login.field.name_placeholder")})]}):null,e.jsxs("div",{children:[e.jsx("label",{htmlFor:"login-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:s("login.field.email")}),e.jsx("input",{id:"login-email",type:"email",autoComplete:"email",required:!0,value:x,onChange:t=>H(t.target.value),className:"w-full h-11 rounded-lg border border-oai-gray-800 bg-oai-gray-900 px-3 text-sm text-white placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"login-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:s("login.field.password")}),e.jsx("input",{id:"login-password",type:"password",autoComplete:l==="signup"?"new-password":"current-password",required:!0,minLength:l==="signup"?W:void 0,value:h,onChange:t=>J(t.target.value),className:"w-full h-11 rounded-lg border border-oai-gray-800 bg-oai-gray-900 px-3 text-sm text-white placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"}),l==="signup"?e.jsx("p",{className:"mt-1 text-xs text-oai-gray-600",children:s("login.password_hint",{min:String(W)})}):null]}),e.jsx("button",{type:"submit",disabled:k||g,className:"w-full h-11 rounded-lg bg-white text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-100 transition-colors disabled:opacity-50",children:l==="signup"?s("login.submit.sign_up"):s("login.submit.sign_in")})]})]})})]}):e.jsxs("div",{className:"min-h-screen bg-oai-gray-950 text-oai-white font-oai antialiased dark flex flex-col",children:[e.jsx("header",{className:"border-b border-oai-gray-900 px-4 sm:px-6 py-4",children:e.jsx(V,{to:"/",className:"text-sm font-medium text-oai-gray-400 hover:text-white no-underline",children:s("login.back_home")})}),e.jsx("main",{className:"flex-1 flex items-center justify-center px-4",children:e.jsx("p",{className:"text-oai-gray-400 text-center max-w-md",children:s("login.cloud_only")})})]})}export{ie as LoginPage};