@mindexec/cli 0.2.359 → 0.2.360
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/package.json +1 -1
- package/wwwroot/assets/{AdminDashboardPage-BgS5FRMr.js → AdminDashboardPage-D8CdgCG3.js} +1 -1
- package/wwwroot/assets/{AppSidebar-7gwE93h0.js → AppSidebar-CqkRTasO.js} +1 -1
- package/wwwroot/assets/AuthPages-CmAHlBT8.js +1 -0
- package/wwwroot/assets/{MindCanvas-BUmfFh7Q.js → MindCanvas-DMxa5cKY.js} +1 -1
- package/wwwroot/assets/{PricingPage-Bn2RPoYf.js → PricingPage-CADslKZR.js} +1 -1
- package/wwwroot/assets/{index-CnxgrZfY.js → index-gjNKWU_x.js} +2 -2
- package/wwwroot/assets/{supabaseAuthAdapter-C3z334Qw.js → supabaseAuthAdapter-Bptc9G29.js} +13 -13
- package/wwwroot/index.html +1 -1
- package/wwwroot/assets/AuthPages-Cq2TSrOI.js +0 -1
package/wwwroot/index.html
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
12
12
|
<link rel="manifest" href="/manifest.webmanifest" />
|
|
13
13
|
<title>MindExec React</title>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-gjNKWU_x.js"></script>
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BXzpOyCS.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/app-runtime-xD2Z3NdN.js">
|
|
17
17
|
<link rel="stylesheet" crossorigin href="/assets/index-DFCCVWKg.css">
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,j as e}from"./vendor-react-BXzpOyCS.js";import{g as C,a as b,b as M,c as A}from"./index-CnxgrZfY.js";import{p as P,P as I}from"./pricingCheckoutShell-O-DnwmbU.js";import{r as $,b as G,s as B,a as O,u as K}from"./supabaseAuthAdapter-C3z334Qw.js";import{R as w}from"./app-runtime-xD2Z3NdN.js";import{X as U,ao as q,ag as _,aT as E,N as T,f as D,aU as k,K as R,aV as F,ac as H}from"./vendor-icons-D0xKCnZS.js";function Y(a){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.trim())}function j(){return $(b())}function L(a,t){return a.source==="supabase-provider-session"?t?`Google sign-in is active for ${a.email}. Return to pricing to continue checkout.`:`Google sign-in is active for ${a.email}.`:t?"A local Google auth shell is active. Return to pricing to continue checkout.":"A local Google auth shell is already active for this browser."}function z(a,t){return t?`Local Google auth shell ready for ${a}. Return to pricing to continue the gated checkout.`:`Local Google auth shell ready for ${a}. Secure Supabase OAuth can replace this adapter later.`}function ee({navigate:a}){const[t,c]=r.useState(!1),[n,d]=r.useState(()=>C()),[o]=r.useState(()=>P()),p=r.useMemo(()=>j(),[]),[x,i]=r.useState(()=>{const s=C(),u=P();return s?L(s,!!u):u?"Sign in to continue MindCanvas Pro checkout. Payment remains gated until the secure adapter is connected.":"Use your Google account to sync cloud projects. No password to create or remember."}),h=()=>{const s=C();if(s)return d(s),i(L(s,!!o)),s;const u=A();return d(u),i(z(u.email,!!o)),u},m=()=>{const s=h(),u={hasCheckoutIntent:!!o,signedIn:!!s,sessionSource:s.source};o?w.emit("auth.returnToPricing",u):w.emit("auth.continueMindCanvas",u),a(o?"/pricing":"/mindcanvas")},g=()=>{const s=A();d(s),i(z(s.email,!!o)),c(!1),window.setTimeout(m,240)},l=async()=>{if(c(!0),p.auth.canAttempt)try{const s=G("/login",o?"/pricing":"/mindcanvas");i("Opening secure Google sign-in..."),await B(b(),s);return}catch(s){i(`Secure Google sign-in failed: ${s instanceof Error?s.message:String(s)}`),c(!1);return}window.setTimeout(()=>{g()},550)},S=n?o?"Continue checkout":"Continue to MindCanvas":t?"Opening Google...":"Continue with Google",y=n?m:l;return e.jsxs(N,{page:"login",children:[e.jsx("button",{className:"auth-close",type:"button",title:"Close",onClick:()=>a("/mindcanvas"),"data-testid":"auth-close",children:e.jsx(U,{size:16})}),e.jsxs("div",{className:"auth-logo",children:[e.jsx(q,{size:24}),e.jsx("strong",{children:"MindExec"})]}),e.jsx("h1",{children:"Sign in with Google"}),e.jsx("p",{"data-testid":"auth-message",children:x}),e.jsxs("button",{className:"google-button",type:"button",disabled:t,onClick:y,"data-testid":"auth-google-shell",children:[e.jsx("span",{className:"google-g",children:"G"}),S]}),e.jsxs("div",{className:"auth-action-strip",children:[n&&o&&e.jsx("button",{type:"button",onClick:m,"data-testid":"auth-return-pricing",children:"Return to pricing"}),e.jsx("button",{type:"button",onClick:()=>a("/forgot-password"),"data-testid":"auth-forgot-password",children:"Forgot password"}),e.jsx("button",{type:"button",onClick:()=>a("/pricing"),"data-testid":"auth-view-pricing",children:"View pricing"})]}),e.jsx("p",{className:"auth-note",children:p.auth.canAttempt?"Secure Supabase OAuth is connected for this browser build.":"The React port keeps this as a local auth shell until the secure Supabase OAuth adapter is connected."})]})}function te({navigate:a}){const[t,c]=r.useState(""),[n,d]=r.useState(!1),[o,p]=r.useState(""),[x,i]=r.useState(!1),h=r.useMemo(()=>j(),[]),m=async g=>{if(g.preventDefault(),!Y(t)){p("Enter a valid email address.");return}if(d(!0),p(""),h.passwordReset.canAttempt){try{const l=G("/reset-password","/login");await O(b(),t,l),i(!0),d(!1),w.emit("auth.reset.requested",{emailDomain:t.split("@")[1]||"",provider:"supabase"})}catch(l){p(l instanceof Error?l.message:String(l)),d(!1)}return}window.setTimeout(()=>{i(!0),d(!1),w.emit("auth.reset.requested",{emailDomain:t.split("@")[1]||""})},450)};return e.jsxs(N,{page:"forgot-password",children:[e.jsxs("button",{className:"auth-back",type:"button",onClick:()=>a("/login"),"data-testid":"forgot-back-login",children:[e.jsx(_,{size:16}),"Sign in"]}),e.jsx("div",{className:"auth-mark auth-mark--amber",children:e.jsx(E,{size:28})}),e.jsx("h1",{children:"Forgot password?"}),e.jsx("p",{children:"No worries. Enter your email and the React auth shell will walk through the reset flow."}),o&&e.jsx("div",{className:"auth-inline-error","data-testid":"forgot-error",children:o}),x?e.jsxs("div",{className:"auth-success-panel","data-testid":"forgot-success",children:[e.jsx(T,{size:32}),e.jsx("strong",{children:"Check your email"}),e.jsxs("span",{children:["Reset instructions were prepared for ",t,"."]}),e.jsx("button",{className:"btn btn-primary",type:"button",onClick:()=>a("/reset-password"),"data-testid":"forgot-continue-reset",children:"Continue to reset"})]}):e.jsxs("form",{className:"auth-form",onSubmit:m,"data-testid":"forgot-password-form",children:[e.jsxs("label",{children:[e.jsx("span",{children:"Email Address"}),e.jsxs("div",{className:"auth-input-wrap",children:[e.jsx(E,{size:18}),e.jsx("input",{value:t,onChange:g=>c(g.target.value),type:"email",placeholder:"you@example.com","data-testid":"forgot-email"})]})]}),e.jsxs("button",{className:"btn btn-primary auth-submit",type:"submit",disabled:n,"data-testid":"forgot-submit",children:[e.jsx(D,{size:16}),n?"Sending...":"Send Reset Link"]})]})]})}function se({navigate:a}){const[t,c]=r.useState(""),[n,d]=r.useState(""),[o,p]=r.useState(!1),[x,i]=r.useState(!1),[h,m]=r.useState(!1),[g,l]=r.useState(""),S=r.useMemo(()=>j(),[]),y=r.useMemo(()=>t.length>=6&&t===n,[n,t]),s=n.length>0&&n!==t,u=async f=>{if(f.preventDefault(),t.length<6){l("Password must be at least 6 characters.");return}if(t!==n){l("Passwords do not match.");return}if(i(!0),l(""),S.passwordReset.canAttempt){try{await K(b(),t),m(!0),i(!1),w.emit("auth.password.updated",{provider:"supabase"})}catch(v){l(v instanceof Error?v.message:String(v)),i(!1)}return}window.setTimeout(()=>{m(!0),i(!1),w.emit("auth.password.updated",{localShell:!0})},520)};return e.jsxs(N,{page:"reset-password",children:[e.jsx("div",{className:`auth-mark ${h?"auth-mark--success":""}`,children:h?e.jsx(T,{size:30}):e.jsx(k,{size:30})}),e.jsx("h1",{children:h?"Password reset!":"Reset password"}),e.jsx("p",{"data-testid":"reset-message",children:h?"Your local auth shell accepted the new password state.":"Enter a new password and confirm it below."}),g&&e.jsx("div",{className:"auth-inline-error","data-testid":"reset-error",children:g}),h?e.jsxs("button",{className:"btn btn-primary auth-submit",type:"button",onClick:()=>a("/login"),"data-testid":"reset-login",children:[e.jsx(R,{size:16}),"Sign In"]}):e.jsxs("form",{className:"auth-form",onSubmit:u,"data-testid":"reset-password-form",children:[e.jsxs("label",{children:[e.jsx("span",{children:"New Password"}),e.jsxs("div",{className:"auth-input-wrap",children:[e.jsx(k,{size:18}),e.jsx("input",{value:t,onChange:f=>c(f.target.value),type:o?"text":"password",placeholder:"Enter new password","data-testid":"reset-password-input"}),e.jsx("button",{type:"button",className:"auth-icon-button",title:"Toggle password visibility",onClick:()=>p(f=>!f),"data-testid":"reset-toggle-visibility",children:o?e.jsx(F,{size:17}):e.jsx(H,{size:17})})]}),e.jsx("span",{className:`auth-requirement ${t.length>=6?"is-met":""}`,children:"At least 6 characters"})]}),e.jsxs("label",{children:[e.jsx("span",{children:"Confirm Password"}),e.jsxs("div",{className:"auth-input-wrap",children:[e.jsx(k,{size:18}),e.jsx("input",{value:n,onChange:f=>d(f.target.value),type:"password",placeholder:"Confirm new password","data-testid":"reset-confirm-input"})]}),n&&e.jsx("span",{className:`auth-requirement ${s?"is-error":"is-met"}`,children:s?"Passwords do not match":"Passwords match"})]}),e.jsxs("button",{className:"btn btn-primary auth-submit",type:"submit",disabled:!y||x,"data-testid":"reset-submit",children:[e.jsx(R,{size:16}),x?"Updating...":"Update Password"]})]})]})}function N({children:a,page:t}){const c=j();return e.jsxs("div",{className:"auth-page","data-testid":"auth-shell","data-auth-page":t,"data-auth-storage-key":M,"data-pricing-checkout-intent-key":I,"data-production-adapter-state":c.overallState,"data-auth-provider-mode":c.auth.mode,"data-auth-provider-ready":c.auth.canAttempt?"true":"false","data-client-secret-blocked":c.forbiddenClientSecretKeys.length>0?"true":"false",children:[e.jsx("div",{className:"auth-scrim"}),e.jsx("section",{className:"auth-card",children:a})]})}export{te as ForgotPasswordPage,ee as LoginPage,se as ResetPasswordPage};
|