flowlink-auth 2.7.8 → 2.8.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.js CHANGED
@@ -4145,19 +4145,25 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
4145
4145
  const toastId = useRef2(0);
4146
4146
  const [toasts, setToasts] = useState3([]);
4147
4147
  useEffect2(() => {
4148
+ const meta = document.createElement("meta");
4149
+ meta.name = "viewport";
4150
+ meta.content = "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no";
4151
+ document.head.appendChild(meta);
4148
4152
  return () => {
4149
4153
  if (redirectTimer.current) clearTimeout(redirectTimer.current);
4150
- toasts.forEach((t) => clearTimeout(t._timer));
4154
+ const existing = document.querySelector('meta[name="viewport"]');
4155
+ if (existing && existing.content === meta.content) {
4156
+ document.head.removeChild(existing);
4157
+ }
4158
+ toasts.forEach((t) => {
4159
+ if (t._timer) clearTimeout(t._timer);
4160
+ });
4151
4161
  };
4152
4162
  }, []);
4153
4163
  function showToast(type, message, ms = 5e3) {
4154
4164
  const id = ++toastId.current;
4155
- const created = Date.now();
4156
- const t = { id, type, message, created, _timer: null };
4157
- setToasts((prev) => {
4158
- const next = [t, ...prev].slice(0, 6);
4159
- return next;
4160
- });
4165
+ const t = { id, type, message, _timer: null };
4166
+ setToasts((prev) => [t, ...prev].slice(0, 6));
4161
4167
  const timer = setTimeout(() => {
4162
4168
  setToasts((prev) => prev.filter((x) => x.id !== id));
4163
4169
  }, ms);
@@ -4166,7 +4172,7 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
4166
4172
  function removeToast(id) {
4167
4173
  setToasts((prev) => {
4168
4174
  prev.forEach((t) => {
4169
- if (t.id === id) clearTimeout(t._timer);
4175
+ if (t.id === id && t._timer) clearTimeout(t._timer);
4170
4176
  });
4171
4177
  return prev.filter((x) => x.id !== id);
4172
4178
  });
@@ -4208,8 +4214,8 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
4208
4214
  body: JSON.stringify({ name: name.trim(), email: email.trim(), password })
4209
4215
  });
4210
4216
  const data = await res.json().catch(async () => {
4211
- const text = await res.text().catch(() => "");
4212
- return { _raw: text };
4217
+ const txt = await res.text().catch(() => "");
4218
+ return { _raw: txt };
4213
4219
  });
4214
4220
  if (!res.ok) {
4215
4221
  const errMsg = data?.error || data?._raw || `Signup failed (${res.status})`;
@@ -4240,9 +4246,7 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
4240
4246
  const callbackUrl = encodeURIComponent(`${typeof window !== "undefined" ? window.location.origin : ""}/signup`);
4241
4247
  const sdkBase = baseUrl || (typeof window !== "undefined" ? window.location.origin.replace(/\/+$/, "") : "");
4242
4248
  const startUrl = `${sdkBase}/sdk/auth/start?rid=${rid}&source=${encodeURIComponent(provider)}&callbackUrl=${callbackUrl}`;
4243
- if (!publishableKey) {
4244
- throw new Error("Missing publishable key (client side).");
4245
- }
4249
+ if (!publishableKey) throw new Error("Missing publishable key (client side).");
4246
4250
  const res = await fetch(startUrl, {
4247
4251
  method: "GET",
4248
4252
  headers: { "x-publishable-key": publishableKey }
@@ -4265,18 +4269,17 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
4265
4269
  if (e && typeof e.preventDefault === "function") e.preventDefault();
4266
4270
  startOAuthFlow("github");
4267
4271
  };
4268
- return /* @__PURE__ */ React3.createElement("div", { style: overlay2 }, /* @__PURE__ */ React3.createElement("div", { style: toastContainer }, toasts.map((t) => /* @__PURE__ */ React3.createElement(
4272
+ return /* @__PURE__ */ React3.createElement("div", { style: styles.overlay }, /* @__PURE__ */ React3.createElement("div", { style: styles.toastContainer, "aria-live": "polite", "aria-atomic": "true" }, toasts.map((t) => /* @__PURE__ */ React3.createElement(
4269
4273
  "div",
4270
4274
  {
4271
4275
  key: t.id,
4272
4276
  role: "status",
4273
- "aria-live": "polite",
4274
4277
  style: {
4275
- ...toastBase,
4276
- ...t.type === "error" ? toastError : t.type === "success" ? toastSuccess : toastInfo
4278
+ ...styles.toastBase,
4279
+ ...t.type === "error" ? styles.toastError : t.type === "success" ? styles.toastSuccess : styles.toastInfo
4277
4280
  },
4278
4281
  onMouseEnter: () => {
4279
- clearTimeout(t._timer);
4282
+ if (t._timer) clearTimeout(t._timer);
4280
4283
  },
4281
4284
  onMouseLeave: () => {
4282
4285
  const timer = setTimeout(() => removeToast(t.id), 3e3);
@@ -4284,13 +4287,13 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
4284
4287
  }
4285
4288
  },
4286
4289
  /* @__PURE__ */ React3.createElement("div", { style: { flex: 1 } }, t.message),
4287
- /* @__PURE__ */ React3.createElement("button", { "aria-label": "Dismiss", onClick: () => removeToast(t.id), style: toastCloseBtn }, "\u2715")
4288
- ))), /* @__PURE__ */ React3.createElement("div", { style: modal2 }, /* @__PURE__ */ React3.createElement("div", { style: modalInner }, /* @__PURE__ */ React3.createElement("header", { style: header }, /* @__PURE__ */ React3.createElement("div", { style: brandRow }, /* @__PURE__ */ React3.createElement("div", { style: logo }, /* @__PURE__ */ React3.createElement("div", { style: logoCircle, "aria-hidden": true })), /* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement("h1", { style: title2 }, "Sign up to ", agency?.name || "App"), /* @__PURE__ */ React3.createElement("div", { style: subtitle2 }, "Welcome! Create your account.")))), /* @__PURE__ */ React3.createElement("section", { style: oauthSection }, /* @__PURE__ */ React3.createElement(
4290
+ /* @__PURE__ */ React3.createElement("button", { "aria-label": "Dismiss", onClick: () => removeToast(t.id), style: styles.toastCloseBtn }, "\u2715")
4291
+ ))), /* @__PURE__ */ React3.createElement("div", { style: styles.modal, role: "dialog", "aria-modal": "true", "aria-labelledby": "signup-title" }, /* @__PURE__ */ React3.createElement("div", { style: styles.modalInner }, /* @__PURE__ */ React3.createElement("header", { style: styles.header }, /* @__PURE__ */ React3.createElement("div", { style: styles.brandRow }, /* @__PURE__ */ React3.createElement("div", { style: styles.logo, "aria-hidden": true }, /* @__PURE__ */ React3.createElement("div", { style: styles.logoCircle })), /* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement("h1", { id: "signup-title", style: styles.title }, "Sign up to ", agency?.name || "App"), /* @__PURE__ */ React3.createElement("div", { style: styles.subtitle }, "Welcome \u2014 create your account.")))), /* @__PURE__ */ React3.createElement("section", { style: styles.oauthSection }, /* @__PURE__ */ React3.createElement(
4289
4292
  "button",
4290
4293
  {
4291
4294
  onClick: handleGoogle,
4292
4295
  type: "button",
4293
- style: { ...oauthButton, ...oauthGoogle },
4296
+ style: { ...styles.oauthButton, ...styles.oauthGoogle },
4294
4297
  disabled: loading || loadingOauth.google,
4295
4298
  "aria-disabled": loading || loadingOauth.google
4296
4299
  },
@@ -4301,13 +4304,13 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
4301
4304
  {
4302
4305
  onClick: handleGithub,
4303
4306
  type: "button",
4304
- style: { ...oauthButton, ...oauthGithub },
4307
+ style: { ...styles.oauthButton, ...styles.oauthGithub },
4305
4308
  disabled: loading || loadingOauth.github,
4306
4309
  "aria-disabled": loading || loadingOauth.github
4307
4310
  },
4308
4311
  /* @__PURE__ */ React3.createElement("svg", { width: 18, style: { marginRight: 10 }, xmlns: "http://www.w3.org/2000/svg", fill: "white", viewBox: "0 0 20 20", "aria-hidden": true }, /* @__PURE__ */ React3.createElement("path", { fillRule: "evenodd", d: "M10 .333A9.911 9.911 0 0 0 6.866 19.65c.5.092.678-.215.678-.477 0-.237-.01-1.017-.014-1.845-2.757.6-3.338-1.169-3.338-1.169a2.627 2.627 0 0 0-1.1-1.451c-.9-.615.07-.6.07-.6a2.084 2.084 0 0 1 1.518 1.021 2.11 2.11 0 0 0 2.884.823c.044-.503.268-.973.63-1.325-2.2-.25-4.516-1.1-4.516-4.9A3.832 3.832 0 0 1 4.7 7.068a3.56 3.56 0 0 1 .095-2.623s.832-.266 2.726 1.016a9.409 9.409 0 0 1 4.962 0c1.89-1.282 2.717-1.016 2.717-1.016.366.83.402 1.768.1 2.623a3.827 3.827 0 0 1 1.02 2.659c0 3.807-2.319 4.644-4.525 4.889a2.366 2.366 0 0 1 .673 1.834c0 1.326-.012 2.394-.012 2.72 0 .263.18.572.681.475A9.911 9.911 0 0 0 10 .333Z", clipRule: "evenodd" })),
4309
4312
  /* @__PURE__ */ React3.createElement("span", null, loadingOauth.github ? "Loading..." : "Continue with GitHub")
4310
- )), /* @__PURE__ */ React3.createElement("div", { style: dividerRow }, /* @__PURE__ */ React3.createElement("div", { style: line }), /* @__PURE__ */ React3.createElement("div", { style: orText }, "or"), /* @__PURE__ */ React3.createElement("div", { style: line })), /* @__PURE__ */ React3.createElement("form", { onSubmit: submit, style: form }, /* @__PURE__ */ React3.createElement("label", { style: label2, htmlFor: "name" }, /* @__PURE__ */ React3.createElement("span", { style: labelText }, "Name"), /* @__PURE__ */ React3.createElement(
4313
+ )), /* @__PURE__ */ React3.createElement("div", { style: styles.dividerRow }, /* @__PURE__ */ React3.createElement("div", { style: styles.line }), /* @__PURE__ */ React3.createElement("div", { style: styles.orText }, "or"), /* @__PURE__ */ React3.createElement("div", { style: styles.line })), /* @__PURE__ */ React3.createElement("form", { onSubmit: submit, style: styles.form }, /* @__PURE__ */ React3.createElement("label", { style: styles.label, htmlFor: "name" }, /* @__PURE__ */ React3.createElement("span", { style: styles.labelText }, "Name"), /* @__PURE__ */ React3.createElement(
4311
4314
  "input",
4312
4315
  {
4313
4316
  id: "name",
@@ -4315,10 +4318,10 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
4315
4318
  value: name,
4316
4319
  onChange: (e) => setName(e.target.value),
4317
4320
  placeholder: "Your name",
4318
- style: input2,
4321
+ style: styles.input,
4319
4322
  autoComplete: "name"
4320
4323
  }
4321
- )), /* @__PURE__ */ React3.createElement("label", { style: label2, htmlFor: "email" }, /* @__PURE__ */ React3.createElement("span", { style: labelText }, "Email address"), /* @__PURE__ */ React3.createElement(
4324
+ )), /* @__PURE__ */ React3.createElement("label", { style: styles.label, htmlFor: "email" }, /* @__PURE__ */ React3.createElement("span", { style: styles.labelText }, "Email address"), /* @__PURE__ */ React3.createElement(
4322
4325
  "input",
4323
4326
  {
4324
4327
  id: "email",
@@ -4327,10 +4330,10 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
4327
4330
  onChange: (e) => setEmail(e.target.value),
4328
4331
  required: true,
4329
4332
  placeholder: "you@example.com",
4330
- style: input2,
4333
+ style: styles.input,
4331
4334
  autoComplete: "email"
4332
4335
  }
4333
- )), /* @__PURE__ */ React3.createElement("label", { style: label2, htmlFor: "password" }, /* @__PURE__ */ React3.createElement("span", { style: labelText }, "Password"), /* @__PURE__ */ React3.createElement(
4336
+ )), /* @__PURE__ */ React3.createElement("label", { style: styles.label, htmlFor: "password" }, /* @__PURE__ */ React3.createElement("span", { style: styles.labelText }, "Password"), /* @__PURE__ */ React3.createElement(
4334
4337
  "input",
4335
4338
  {
4336
4339
  id: "password",
@@ -4339,251 +4342,262 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
4339
4342
  onChange: (e) => setPassword(e.target.value),
4340
4343
  required: true,
4341
4344
  placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
4342
- style: input2,
4345
+ style: styles.input,
4343
4346
  autoComplete: "new-password"
4344
4347
  }
4345
4348
  )), /* @__PURE__ */ React3.createElement(
4346
4349
  "button",
4347
4350
  {
4348
4351
  type: "submit",
4349
- style: submitButton,
4352
+ style: styles.submitButton,
4350
4353
  disabled: loading,
4351
4354
  "aria-disabled": loading
4352
4355
  },
4353
4356
  loading ? "Signing up..." : "Sign Up"
4354
- ))), /* @__PURE__ */ React3.createElement("div", { style: modalFooter }, /* @__PURE__ */ React3.createElement("div", { style: belowRow }, /* @__PURE__ */ React3.createElement("span", { style: muted }, "Already have an account? "), /* @__PURE__ */ React3.createElement(import_link.default, { href: "/sign-in", style: link }, "Sign in")), /* @__PURE__ */ React3.createElement("div", { style: dividerThin }), /* @__PURE__ */ React3.createElement("div", { style: secured }, /* @__PURE__ */ React3.createElement("div", { style: securedText }, "Secured by auth")))));
4357
+ ))), /* @__PURE__ */ React3.createElement("div", { style: styles.modalFooter }, /* @__PURE__ */ React3.createElement("div", { style: styles.belowRow }, /* @__PURE__ */ React3.createElement("span", { style: styles.muted }, "Already have an account? "), /* @__PURE__ */ React3.createElement(import_link.default, { href: "/sign-in", style: styles.link }, "Sign in")), /* @__PURE__ */ React3.createElement("div", { style: styles.dividerThin }), /* @__PURE__ */ React3.createElement("div", { style: styles.secured }, /* @__PURE__ */ React3.createElement("div", { style: styles.securedText }, "Secured by auth")))));
4355
4358
  }
4356
- var overlay2 = {
4357
- position: "fixed",
4358
- inset: 0,
4359
- display: "flex",
4360
- alignItems: "center",
4361
- justifyContent: "center",
4362
- padding: 20,
4363
- background: "linear-gradient(180deg, rgba(2,6,23,0.22), rgba(2,6,23,0.32))",
4364
- backdropFilter: "blur(6px)",
4365
- minHeight: "100vh",
4366
- zIndex: 9999
4367
- };
4368
- var modal2 = {
4369
- width: "100%",
4370
- maxWidth: 560,
4371
- borderRadius: 14,
4372
- background: "linear-gradient(180deg, rgba(15,19,24,0.6), rgba(10,12,16,0.6))",
4373
- // translucent neutral so background peeks through
4374
- border: "1px solid rgba(99,102,106,0.12)",
4375
- // slightly stronger neutral border
4376
- boxShadow: "0 20px 50px rgba(2,6,23,0.55), inset 0 1px 0 rgba(255,255,255,0.02)",
4377
- overflow: "hidden",
4378
- display: "flex",
4379
- flexDirection: "column",
4380
- transform: "translateY(-6px)"
4381
- };
4382
- var modalInner = {
4383
- padding: 18,
4384
- display: "flex",
4385
- flexDirection: "column",
4386
- gap: 12
4387
- };
4388
- var header = {
4389
- paddingBottom: 6,
4390
- borderBottom: "1px solid rgba(148,163,184,0.04)"
4391
- };
4392
- var brandRow = {
4393
- display: "flex",
4394
- alignItems: "center",
4395
- gap: 12
4396
- };
4397
- var logo = {
4398
- width: 44,
4399
- height: 44,
4400
- display: "flex",
4401
- alignItems: "center",
4402
- justifyContent: "center"
4403
- };
4404
- var logoCircle = {
4405
- width: 36,
4406
- height: 36,
4407
- borderRadius: 999,
4408
- background: "linear-gradient(135deg,#2f3438,#11151a)",
4409
- boxShadow: "0 4px 12px rgba(2,6,23,0.6)"
4410
- };
4411
- var title2 = {
4412
- margin: 0,
4413
- fontSize: 18,
4414
- fontWeight: 600,
4415
- color: "#e6e6e6"
4416
- };
4417
- var subtitle2 = {
4418
- fontSize: 13,
4419
- color: "rgba(230,230,230,0.72)",
4420
- marginTop: 4
4421
- };
4422
- var oauthSection = {
4423
- marginTop: 8,
4424
- display: "flex",
4425
- gap: 8
4426
- };
4427
- var oauthButton = {
4428
- flex: 1,
4429
- display: "inline-flex",
4430
- alignItems: "center",
4431
- justifyContent: "center",
4432
- padding: "10px 12px",
4433
- borderRadius: 10,
4434
- border: "1px solid rgba(148,163,184,0.08)",
4435
- fontSize: 14,
4436
- cursor: "pointer",
4437
- userSelect: "none",
4438
- gap: 8,
4439
- minHeight: 40
4440
- };
4441
- var oauthGoogle = {
4442
- background: "linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01))",
4443
- color: "#fff"
4444
- };
4445
- var oauthGithub = {
4446
- background: "linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00))",
4447
- color: "#fff"
4448
- };
4449
- var dividerRow = {
4450
- display: "flex",
4451
- alignItems: "center",
4452
- gap: 10,
4453
- marginTop: 12
4454
- };
4455
- var line = {
4456
- flex: 1,
4457
- height: 1,
4458
- background: "rgba(148,163,184,0.06)"
4459
- };
4460
- var orText = {
4461
- fontSize: 13,
4462
- color: "rgba(230,230,230,0.65)",
4463
- padding: "0 8px"
4464
- };
4465
- var form = {
4466
- display: "flex",
4467
- flexDirection: "column",
4468
- gap: 10,
4469
- marginTop: 6
4470
- };
4471
- var label2 = {
4472
- display: "flex",
4473
- flexDirection: "column",
4474
- gap: 6
4475
- };
4476
- var labelText = {
4477
- fontSize: 13,
4478
- color: "rgba(230,230,230,0.68)"
4479
- };
4480
- var input2 = {
4481
- width: "100%",
4482
- padding: "10px 12px",
4483
- borderRadius: 10,
4484
- background: "rgba(255,255,255,0.02)",
4485
- color: "#e6e6e6",
4486
- border: "1px solid rgba(148,163,184,0.10)",
4487
- fontSize: 14,
4488
- outline: "none",
4489
- boxSizing: "border-box",
4490
- transition: "box-shadow 120ms, border-color 120ms"
4491
- };
4492
- var submitButton = {
4493
- marginTop: 6,
4494
- width: "100%",
4495
- padding: "10px 12px",
4496
- borderRadius: 10,
4497
- background: "linear-gradient(180deg,#475569,#94a3b8)",
4498
- border: "none",
4499
- color: "#fff",
4500
- fontWeight: 600,
4501
- cursor: "pointer",
4502
- fontSize: 15,
4503
- display: "inline-flex",
4504
- alignItems: "center",
4505
- justifyContent: "center",
4506
- minHeight: 44
4507
- };
4508
- var modalFooter = {
4509
- padding: "12px 18px 18px 18px",
4510
- borderTop: "1px solid rgba(148,163,184,0.03)",
4511
- display: "flex",
4512
- flexDirection: "column",
4513
- gap: 8
4514
- };
4515
- var belowRow = {
4516
- textAlign: "center",
4517
- display: "flex",
4518
- justifyContent: "center",
4519
- gap: 8,
4520
- alignItems: "center"
4521
- };
4522
- var muted = {
4523
- color: "rgba(230,230,230,0.66)",
4524
- fontSize: 13
4525
- };
4526
- var link = {
4527
- color: "#9fb0d9",
4528
- textDecoration: "none",
4529
- fontWeight: 600
4530
- };
4531
- var dividerThin = {
4532
- height: 1,
4533
- background: "rgba(148,163,184,0.04)",
4534
- marginTop: 6,
4535
- marginBottom: 6
4536
- };
4537
- var secured = {
4538
- textAlign: "center"
4539
- };
4540
- var securedText = {
4541
- color: "rgba(230,230,230,0.9)",
4542
- fontSize: 13,
4543
- fontWeight: 600
4544
- };
4545
- var toastContainer = {
4546
- position: "fixed",
4547
- top: 18,
4548
- right: 18,
4549
- width: 360,
4550
- maxWidth: "calc(100% - 36px)",
4551
- display: "flex",
4552
- flexDirection: "column",
4553
- gap: 10,
4554
- zIndex: 6e4
4555
- };
4556
- var toastBase = {
4557
- display: "flex",
4558
- gap: 10,
4559
- alignItems: "center",
4560
- padding: "10px 12px",
4561
- borderRadius: 10,
4562
- boxShadow: "0 8px 20px rgba(2,6,23,0.6)",
4563
- color: "#fff",
4564
- fontSize: 13,
4565
- minWidth: 120
4566
- };
4567
- var toastError = {
4568
- background: "#000000",
4569
- border: "1px solid rgba(255,255,255,0.06)"
4570
- };
4571
- var toastSuccess = {
4572
- background: "#000000",
4573
- border: "1px solid rgba(255,255,255,0.06)"
4574
- };
4575
- var toastInfo = {
4576
- background: "#000000",
4577
- border: "1px solid rgba(255,255,255,0.06)"
4578
- };
4579
- var toastCloseBtn = {
4580
- marginLeft: 8,
4581
- background: "transparent",
4582
- border: "none",
4583
- color: "rgba(255,255,255,0.7)",
4584
- cursor: "pointer",
4585
- fontSize: 14,
4586
- lineHeight: 1
4359
+ var styles = {
4360
+ overlay: {
4361
+ position: "fixed",
4362
+ inset: 0,
4363
+ display: "block",
4364
+ // use block + scrolling container for zoom resilience
4365
+ padding: 20,
4366
+ background: "linear-gradient(180deg, rgba(2,6,23,0.22), rgba(2,6,23,0.32))",
4367
+ backdropFilter: "blur(6px)",
4368
+ overflowY: "auto",
4369
+ // allow page scroll when zoomed
4370
+ WebkitOverflowScrolling: "touch",
4371
+ minHeight: "100vh",
4372
+ zIndex: 9999
4373
+ },
4374
+ // modal: reduced width (not too wide), centered with margin auto, allows internal scroll
4375
+ modal: {
4376
+ width: "100%",
4377
+ maxWidth: 460,
4378
+ // reduced width per request
4379
+ margin: "40px auto",
4380
+ // vertical margin so modal isn't glued to top when zoomed
4381
+ borderRadius: 14,
4382
+ background: "linear-gradient(180deg, rgba(15,19,24,0.85), rgba(10,12,16,0.85))",
4383
+ // translucent neutral
4384
+ border: "1px solid rgba(99,102,106,0.12)",
4385
+ // visible neutral border
4386
+ boxShadow: "0 18px 48px rgba(2,6,23,0.55), inset 0 1px 0 rgba(255,255,255,0.02)",
4387
+ overflow: "hidden",
4388
+ display: "flex",
4389
+ flexDirection: "column",
4390
+ maxHeight: "calc(100vh - 80px)"
4391
+ // keep inside viewport
4392
+ },
4393
+ modalInner: {
4394
+ padding: 18,
4395
+ display: "flex",
4396
+ flexDirection: "column",
4397
+ gap: 12,
4398
+ overflowY: "auto"
4399
+ },
4400
+ header: {
4401
+ paddingBottom: 6,
4402
+ borderBottom: "1px solid rgba(148,163,184,0.04)"
4403
+ },
4404
+ brandRow: {
4405
+ display: "flex",
4406
+ alignItems: "center",
4407
+ gap: 12
4408
+ },
4409
+ logo: {
4410
+ width: 44,
4411
+ height: 44,
4412
+ display: "flex",
4413
+ alignItems: "center",
4414
+ justifyContent: "center"
4415
+ },
4416
+ logoCircle: {
4417
+ width: 36,
4418
+ height: 36,
4419
+ borderRadius: 999,
4420
+ background: "linear-gradient(135deg,#2f3438,#11151a)",
4421
+ boxShadow: "0 4px 12px rgba(2,6,23,0.6)"
4422
+ },
4423
+ title: {
4424
+ margin: 0,
4425
+ fontSize: 18,
4426
+ fontWeight: 600,
4427
+ color: "#e6e6e6"
4428
+ },
4429
+ subtitle: {
4430
+ fontSize: 13,
4431
+ color: "rgba(230,230,230,0.72)",
4432
+ marginTop: 4
4433
+ },
4434
+ oauthSection: {
4435
+ marginTop: 8,
4436
+ display: "flex",
4437
+ gap: 8
4438
+ },
4439
+ oauthButton: {
4440
+ flex: 1,
4441
+ display: "inline-flex",
4442
+ alignItems: "center",
4443
+ justifyContent: "center",
4444
+ padding: "10px 12px",
4445
+ borderRadius: 10,
4446
+ border: "1px solid rgba(148,163,184,0.08)",
4447
+ fontSize: 14,
4448
+ cursor: "pointer",
4449
+ userSelect: "none",
4450
+ gap: 8,
4451
+ minHeight: 40,
4452
+ background: "transparent",
4453
+ color: "#fff"
4454
+ },
4455
+ oauthGoogle: {
4456
+ background: "linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01))"
4457
+ },
4458
+ oauthGithub: {
4459
+ background: "linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00))"
4460
+ },
4461
+ dividerRow: {
4462
+ display: "flex",
4463
+ alignItems: "center",
4464
+ gap: 10,
4465
+ marginTop: 12
4466
+ },
4467
+ line: {
4468
+ flex: 1,
4469
+ height: 1,
4470
+ background: "rgba(148,163,184,0.06)"
4471
+ },
4472
+ orText: {
4473
+ fontSize: 13,
4474
+ color: "rgba(230,230,230,0.65)",
4475
+ padding: "0 8px"
4476
+ },
4477
+ form: {
4478
+ display: "flex",
4479
+ flexDirection: "column",
4480
+ gap: 10,
4481
+ marginTop: 6
4482
+ },
4483
+ label: {
4484
+ display: "flex",
4485
+ flexDirection: "column",
4486
+ gap: 6
4487
+ },
4488
+ labelText: {
4489
+ fontSize: 13,
4490
+ color: "rgba(230,230,230,0.68)"
4491
+ },
4492
+ input: {
4493
+ width: "100%",
4494
+ padding: "10px 12px",
4495
+ borderRadius: 10,
4496
+ background: "rgba(255,255,255,0.02)",
4497
+ color: "#e6e6e6",
4498
+ border: "1px solid rgba(148,163,184,0.10)",
4499
+ fontSize: 14,
4500
+ outline: "none",
4501
+ boxSizing: "border-box",
4502
+ transition: "box-shadow 120ms, border-color 120ms"
4503
+ },
4504
+ submitButton: {
4505
+ marginTop: 6,
4506
+ width: "100%",
4507
+ padding: "10px 12px",
4508
+ borderRadius: 10,
4509
+ background: "linear-gradient(180deg,#475569,#94a3b8)",
4510
+ border: "none",
4511
+ color: "#fff",
4512
+ fontWeight: 600,
4513
+ cursor: "pointer",
4514
+ fontSize: 15,
4515
+ display: "inline-flex",
4516
+ alignItems: "center",
4517
+ justifyContent: "center",
4518
+ minHeight: 44
4519
+ },
4520
+ modalFooter: {
4521
+ padding: "12px 18px 18px 18px",
4522
+ borderTop: "1px solid rgba(148,163,184,0.03)",
4523
+ display: "flex",
4524
+ flexDirection: "column",
4525
+ gap: 8
4526
+ },
4527
+ belowRow: {
4528
+ textAlign: "center",
4529
+ display: "flex",
4530
+ justifyContent: "center",
4531
+ gap: 8,
4532
+ alignItems: "center"
4533
+ },
4534
+ muted: {
4535
+ color: "rgba(230,230,230,0.66)",
4536
+ fontSize: 13
4537
+ },
4538
+ link: {
4539
+ color: "#9fb0d9",
4540
+ textDecoration: "none",
4541
+ fontWeight: 600
4542
+ },
4543
+ dividerThin: {
4544
+ height: 1,
4545
+ background: "rgba(148,163,184,0.04)",
4546
+ marginTop: 6,
4547
+ marginBottom: 6
4548
+ },
4549
+ secured: {
4550
+ textAlign: "center"
4551
+ },
4552
+ securedText: {
4553
+ color: "rgba(230,230,230,0.9)",
4554
+ fontSize: 13,
4555
+ fontWeight: 600
4556
+ },
4557
+ /* Toasts: black background */
4558
+ toastContainer: {
4559
+ position: "fixed",
4560
+ top: 18,
4561
+ right: 18,
4562
+ width: 360,
4563
+ maxWidth: "calc(100% - 36px)",
4564
+ display: "flex",
4565
+ flexDirection: "column",
4566
+ gap: 10,
4567
+ zIndex: 6e4
4568
+ },
4569
+ toastBase: {
4570
+ display: "flex",
4571
+ gap: 10,
4572
+ alignItems: "center",
4573
+ padding: "10px 12px",
4574
+ borderRadius: 10,
4575
+ boxShadow: "0 8px 20px rgba(2,6,23,0.6)",
4576
+ color: "#fff",
4577
+ fontSize: 13,
4578
+ minWidth: 120
4579
+ },
4580
+ toastError: {
4581
+ background: "#000000",
4582
+ border: "1px solid rgba(255,255,255,0.06)"
4583
+ },
4584
+ toastSuccess: {
4585
+ background: "#000000",
4586
+ border: "1px solid rgba(255,255,255,0.06)"
4587
+ },
4588
+ toastInfo: {
4589
+ background: "#000000",
4590
+ border: "1px solid rgba(255,255,255,0.06)"
4591
+ },
4592
+ toastCloseBtn: {
4593
+ marginLeft: 8,
4594
+ background: "transparent",
4595
+ border: "none",
4596
+ color: "rgba(255,255,255,0.7)",
4597
+ cursor: "pointer",
4598
+ fontSize: 14,
4599
+ lineHeight: 1
4600
+ }
4587
4601
  };
4588
4602
  export {
4589
4603
  provider_default as FlowlinkAuthProvider,