@atlasauth/embed 0.8.0 → 0.10.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/CHANGELOG.md +28 -0
- package/dist/appearance.d.ts +2 -0
- package/dist/appearance.js.map +1 -1
- package/dist/config.js +4 -0
- package/dist/config.js.map +1 -1
- package/dist/embed.js +10 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js.map +1 -1
- package/dist/styles.d.ts +1 -1
- package/dist/styles.js +2 -0
- package/dist/styles.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/widget/flow.d.ts +20 -0
- package/dist/widget/flow.js +82 -1
- package/dist/widget/flow.js.map +1 -1
- package/dist/widget/forms.js +72 -8
- package/dist/widget/forms.js.map +1 -1
- package/dist/widget/mfa.d.ts +30 -0
- package/dist/widget/mfa.js +271 -0
- package/dist/widget/mfa.js.map +1 -0
- package/dist/widget/passkey.d.ts +12 -7
- package/dist/widget/passkey.js +57 -3
- package/dist/widget/passkey.js.map +1 -1
- package/dist/widget/render.js +18 -2
- package/dist/widget/render.js.map +1 -1
- package/dist/widget.d.ts +26 -1
- package/dist/widget.js +11 -0
- package/dist/widget.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* users who want the same API as an import.
|
|
12
12
|
*/
|
|
13
13
|
export { AtlasWidget, type WidgetOptions } from './widget';
|
|
14
|
+
export type { PasskeyPrfEventDetail } from './widget/passkey';
|
|
14
15
|
export { defineElements, AtlasSignInElement, AtlasSignUpElement } from './element';
|
|
15
16
|
export { mountSignIn, mountSignUp, type MountTarget } from './mount';
|
|
16
17
|
export { setScriptDefaults, readScriptTag, type ScriptDefaults } from './config';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;GAWG;AACH,mCAA2D;AAAlD,qGAAA,WAAW,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;GAWG;AACH,mCAA2D;AAAlD,qGAAA,WAAW,OAAA;AAEpB,qCAAmF;AAA1E,yGAAA,cAAc,OAAA;AAAE,6GAAA,kBAAkB,OAAA;AAAE,6GAAA,kBAAkB,OAAA;AAC/D,iCAAqE;AAA5D,oGAAA,WAAW,OAAA;AAAE,oGAAA,WAAW,OAAA;AACjC,mCAAiF;AAAxE,2GAAA,iBAAiB,OAAA;AAAE,uGAAA,aAAa,OAAA;AACzC,uCAA8C;AAArC,4GAAA,gBAAgB,OAAA;AACzB,2CAoBsB;AAnBpB,2GAAA,aAAa,OAAA;AACb,0GAAA,YAAY,OAAA;AACZ,8GAAA,gBAAgB,OAAA;AAChB,2GAAA,aAAa,OAAA;AACb,sGAAA,QAAQ,OAAA;AACR,kHAAA,oBAAoB,OAAA;AAetB,iCAAuC;AAA9B,qGAAA,YAAY,OAAA;AACrB,mCAA2D;AAAlD,sGAAA,YAAY,OAAA;AAErB,qCAAiE;AAAxD,0GAAA,eAAe,OAAA;AAAE,8GAAA,mBAAmB,OAAA"}
|
package/dist/styles.d.ts
CHANGED
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
* before `GET /v1/appearance` resolves — and re-themes when it does.
|
|
13
13
|
*/
|
|
14
14
|
export declare const STYLE_MARKER = "atlas-embed-styles";
|
|
15
|
-
export declare const EMBED_CSS = "\n.atlas-embed-root {\n --_bg: var(--atlas-embed-color-background, #ffffff);\n --_card: var(--atlas-embed-color-card, #ffffff);\n --_text: var(--atlas-embed-color-text, #1c1c1f);\n --_primary: var(--atlas-embed-color-primary, #5b5bd6);\n --_on-primary: var(--atlas-embed-color-text-on-primary, #ffffff);\n /* Keyboard focus ring \u2014 a solid outline. The widget sets it to the primary\n adjusted to 3:1 on the card/background (or the page's explicit ring). */\n --_focus: var(--atlas-embed-color-focus-ring, var(--_primary));\n --_border: var(--atlas-embed-color-border, #e4e4e9);\n --_radius: var(--atlas-embed-border-radius, 10px);\n /* Transition tempo \u2014 the widget sets --atlas-embed-motion from motionSpeed and\n to 0s when animations are off; reduced-motion forces 0s below regardless. */\n --_motion: var(--atlas-embed-motion, 0.16s);\n font-family: var(--atlas-embed-font-family, ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif);\n color: var(--_text);\n box-sizing: border-box;\n display: block;\n}\n.atlas-embed-root *, .atlas-embed-root *::before, .atlas-embed-root *::after { box-sizing: border-box; }\n.atlas-embed-card {\n max-width: 400px;\n margin: 0 auto;\n padding: 28px 26px;\n background: var(--_card);\n border: 1px solid var(--_border);\n border-radius: calc(var(--_radius) + 4px);\n box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 28px rgba(0,0,0,0.06);\n}\n.atlas-embed-logo { display: block; max-height: 40px; margin: 0 auto 16px; }\n.atlas-embed-title { font-size: 20px; font-weight: 650; text-align: center; margin: 0 0 4px; }\n.atlas-embed-subtitle { font-size: 14px; color: #6b7280; text-align: center; margin: 0 0 20px; }\n.atlas-embed-social { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }\n.atlas-embed-social-button {\n display: flex; align-items: center; justify-content: center; gap: 8px;\n width: 100%; padding: 10px 12px; font-size: 14px; font-weight: 550; cursor: pointer;\n color: var(--_text); background: var(--_card);\n border: 1px solid var(--_border); border-radius: var(--_radius);\n}\n.atlas-embed-social-button:hover { filter: brightness(0.97); }\n.atlas-embed-social-icon { display: inline-flex; flex: none; line-height: 0; }\n.atlas-embed-social-icon svg { width: 18px; height: 18px; display: block; }\n.atlas-embed-social-label { display: inline-block; }\n\n/* Size \u2014 button scale and icon size together. */\n.atlas-embed-social[data-size=\"sm\"] .atlas-embed-social-button { padding: 8px 10px; font-size: 13px; }\n.atlas-embed-social[data-size=\"sm\"] .atlas-embed-social-icon svg { width: 16px; height: 16px; }\n.atlas-embed-social[data-size=\"lg\"] .atlas-embed-social-button { padding: 13px 16px; font-size: 15px; }\n.atlas-embed-social[data-size=\"lg\"] .atlas-embed-social-icon svg { width: 22px; height: 22px; }\n\n/* Icon-only variant: a square button, name in the tooltip. Always laid out as a\n centred wrap (or a carousel), never a full-width bar. */\n.atlas-embed-social-button[data-variant=\"icon\"] { width: auto; padding: 10px; aspect-ratio: 1; }\n.atlas-embed-social[data-size=\"sm\"] .atlas-embed-social-button[data-variant=\"icon\"] { padding: 8px; }\n.atlas-embed-social[data-size=\"lg\"] .atlas-embed-social-button[data-variant=\"icon\"] { padding: 13px; }\n.atlas-embed-social[data-variant=\"icon\"]:not([data-layout=\"carousel\"]) {\n flex-direction: row; flex-wrap: wrap; justify-content: center;\n}\n\n/* Grid \u2014 bars share a row and wrap. */\n.atlas-embed-social[data-layout=\"grid\"] { flex-direction: row; flex-wrap: wrap; }\n.atlas-embed-social[data-layout=\"grid\"] .atlas-embed-social-button { width: auto; flex: 1 1 auto; }\n.atlas-embed-social[data-layout=\"grid\"] .atlas-embed-social-button[data-variant=\"icon\"] { flex: 0 0 auto; }\n\n/* Carousel \u2014 one swipeable, scroll-snapped row. The raw scrollbar is hidden; the\n arrow buttons (below) are the affordance instead. */\n.atlas-embed-social[data-layout=\"carousel\"] {\n flex-direction: row; flex-wrap: nowrap; overflow-x: auto;\n scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scroll-behavior: smooth;\n scrollbar-width: none;\n}\n.atlas-embed-social[data-layout=\"carousel\"]::-webkit-scrollbar { display: none; }\n.atlas-embed-social[data-layout=\"carousel\"] .atlas-embed-social-button { width: auto; flex: 0 0 auto; scroll-snap-align: start; }\n.atlas-embed-social[data-layout=\"carousel\"] .atlas-embed-social-button[data-variant=\"block\"] { min-width: 60%; }\n\n/* Carousel shell \u2014 prev/next controls flanking the scroll row. */\n.atlas-embed-carousel { position: relative; display: flex; align-items: center; gap: 4px; margin-bottom: 16px; }\n.atlas-embed-carousel .atlas-embed-social { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }\n.atlas-embed-carousel-nav {\n flex: none; display: inline-flex; align-items: center; justify-content: center;\n width: 30px; height: 30px; padding: 0; cursor: pointer;\n color: var(--_text); background: var(--_card);\n border: 1px solid var(--_border); border-radius: 999px; transition: opacity 0.15s;\n}\n.atlas-embed-carousel-nav svg { width: 16px; height: 16px; display: block; }\n.atlas-embed-carousel-nav:hover:not(:disabled) { filter: brightness(0.97); }\n.atlas-embed-carousel-nav:disabled { opacity: 0.35; cursor: default; }\n/* Nothing overflows \u2192 no controls at all. */\n.atlas-embed-carousel[data-overflow=\"false\"] .atlas-embed-carousel-nav { display: none; }\n/* When the carousel sits inside a search field, the field owns the bottom margin. */\n.atlas-embed-social-field .atlas-embed-carousel { margin-bottom: 0; }\n\n/* Search \u2014 a filter box above a long provider list (socialButtons.search). The\n field wraps the button container so its own margin replaces the button block's. */\n.atlas-embed-social-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }\n.atlas-embed-social-field .atlas-embed-social { margin-bottom: 0; }\n.atlas-embed-social-search {\n width: 100%; padding: 9px 12px; font-size: 16px; color: var(--_text);\n background: var(--_bg); border: 1px solid var(--_border); border-radius: var(--_radius);\n}\n.atlas-embed-social-search:focus { outline: 2px solid var(--_focus); outline-offset: -1px; }\n.atlas-embed-social-button[hidden] { display: none; }\n.atlas-embed-social-empty { font-size: 13px; color: #9ca3af; text-align: center; padding: 6px 0; }\n.atlas-embed-social-empty[hidden] { display: none; }\n.atlas-embed-divider {\n display: flex; align-items: center; text-align: center; gap: 10px;\n color: #9ca3af; font-size: 12px; margin: 14px 0;\n}\n.atlas-embed-divider::before, .atlas-embed-divider::after {\n content: \"\"; flex: 1; height: 1px; background: var(--_border);\n}\n.atlas-embed-field { display: block; margin: 0 0 12px; }\n.atlas-embed-label { display: block; font-size: 13px; margin: 0 0 5px; color: var(--_text); }\n.atlas-embed-input {\n /* 16px: iOS Safari zooms the page when a smaller field takes focus. */\n width: 100%; padding: 10px 12px; font-size: 16px; color: var(--_text);\n background: var(--_bg); border: 1px solid var(--_border); border-radius: var(--_radius);\n}\n.atlas-embed-input:focus { outline: 2px solid var(--_focus); outline-offset: -1px; }\n/* Password field with a show/hide toggle. */\n.atlas-embed-password { position: relative; display: flex; align-items: center; }\n.atlas-embed-password .atlas-embed-input { width: 100%; padding-right: 54px; }\n.atlas-embed-password-toggle {\n position: absolute; right: 6px; padding: 4px 7px; font: inherit; font-size: 12px; font-weight: 600;\n cursor: pointer; color: var(--_primary); background: none; border: 0; border-radius: 6px;\n}\n.atlas-embed-password-toggle:hover { text-decoration: underline; }\nselect.atlas-embed-input { appearance: auto; }\n.atlas-embed-field-checkbox { display: flex; flex-direction: row-reverse; align-items: center; justify-content: flex-end; gap: 8px; }\n.atlas-embed-field-checkbox .atlas-embed-label { margin: 0; }\n.atlas-embed-checkbox { width: 16px; height: 16px; margin: 0; flex: none; }\ntextarea.atlas-embed-input { min-height: 72px; resize: vertical; font-family: inherit; }\nfieldset.atlas-embed-field { border: 0; padding: 0; margin: 0 0 12px; }\n.atlas-embed-choices { display: flex; flex-direction: column; gap: 6px; }\n.atlas-embed-choice { display: flex; flex-direction: row; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }\n.atlas-embed-choice input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--_primary); }\n.atlas-embed-button {\n width: 100%; margin-top: 6px; padding: 11px 12px; font-size: 14px; font-weight: 650;\n cursor: pointer; color: var(--_on-primary); background: var(--_primary);\n border: 0; border-radius: var(--_radius);\n}\n.atlas-embed-button:disabled { opacity: 0.6; cursor: default; }\n.atlas-embed-button:focus-visible, .atlas-embed-social-button:focus-visible,\n.atlas-embed-handle-back:focus-visible, .atlas-embed-step-back:focus-visible,\n.atlas-embed-password-toggle:focus-visible, .atlas-embed-carousel-nav:focus-visible {\n outline: 2px solid var(--_focus); outline-offset: 2px;\n}\n.atlas-embed-handle-back {\n width: 100%; margin-top: 8px; padding: 6px; font-size: 13px; font-weight: 550;\n cursor: pointer; color: #6b7280; background: none; border: 0;\n}\n.atlas-embed-handle-back:hover { color: #374151; }\n.atlas-embed-error { display: block; font-size: 13px; color: #d64545; margin: 6px 0 0; }\n.atlas-embed-form-error { font-size: 13px; color: #d64545; margin: 0 0 12px; min-height: 0; }\n/* A success/confirmation banner (e.g. after a force-login password reset). */\n.atlas-embed-flash {\n font-size: 13px; color: #0f7a4d; background: rgba(16,163,101,0.08);\n border: 1px solid rgba(16,163,101,0.25); border-radius: var(--_radius);\n padding: 9px 11px; margin: 0 0 14px; text-align: center;\n}\n.atlas-embed-footer { font-size: 13px; color: #6b7280; text-align: center; margin: 16px 0 0; }\n/* \u00A75.1 legal consent row on sign-up. */\n.atlas-embed-consent { display: flex; align-items: flex-start; gap: 8px; margin: 2px 0 14px; font-size: 13px; color: #6b7280; }\n.atlas-embed-consent-check { margin: 2px 0 0; width: 15px; height: 15px; flex: none; accent-color: var(--_primary); cursor: pointer; }\n.atlas-embed-consent-link { color: var(--_primary); text-decoration: underline; }\n/* \u00A77.5 Remember-me row. */\n.atlas-embed-remember { display: flex; align-items: center; gap: 8px; margin: -2px 0 14px; font-size: 13px; color: var(--_text); cursor: pointer; }\n.atlas-embed-remember-check { width: 15px; height: 15px; flex: none; accent-color: var(--_primary); cursor: pointer; }\n.atlas-embed-note { font-size: 14px; color: #6b7280; text-align: center; margin: 8px 0; }\n\n/* Verification step \u2014 a continuation of the email panel, not a new screen: the\n context line (\"Enter the code we sent to \u2026\") + a way back, then a segmented\n one-box-per-digit code input that spawns in. */\n.atlas-embed-step-context { text-align: center; margin: 0 0 20px; }\n.atlas-embed-step-context .atlas-embed-subtitle { margin: 0 0 6px; }\n.atlas-embed-step-back {\n display: inline-block; padding: 2px 4px; font: inherit; font-size: 13px; font-weight: 550;\n cursor: pointer; color: var(--_primary); background: none; border: 0;\n}\n.atlas-embed-step-back:hover { text-decoration: underline; }\n/* A standalone action under the submit button (Forgot password?, Back to sign in,\n the 2FA toggle) reads as a centred link, not a left-aligned fragment. */\nform > .atlas-embed-step-back { display: block; width: 100%; text-align: center; margin-top: 10px; }\n.atlas-embed-code { display: flex; gap: 8px; justify-content: space-between; }\n.atlas-embed-code-box {\n flex: 1 1 0; min-width: 0; aspect-ratio: 1 / 1.15; padding: 0; text-align: center;\n font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--_text);\n background: var(--_bg); border: 1px solid var(--_border); border-radius: var(--_radius);\n}\n.atlas-embed-code-box:focus { outline: 2px solid var(--_focus); outline-offset: -1px; }\n/* A real step change eases its content in; error/busy re-renders (same step) do\n not, and a reduced-motion viewer gets no animation at all. */\n@media (prefers-reduced-motion: no-preference) {\n .atlas-embed-card[data-enter] > form,\n .atlas-embed-card[data-enter] > .atlas-embed-step-context {\n animation: atlas-embed-spawn 0.26s cubic-bezier(0.22, 0.61, 0.36, 1) both;\n }\n}\n@keyframes atlas-embed-spawn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }\n\n/* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n Interaction / polish layer \u2014 how controls FEEL. Driven by data-attributes on\n the root (data-button-style / -button-effect / -shadow / -density /\n -input-style) that the widget sets from the resolved interaction config, plus\n the --_motion tempo var. Every rule is additive: with no attributes set the\n widget looks exactly as it did before this layer existed.\n \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n/* Smooth every interactive control at the configured tempo. */\n.atlas-embed-button, .atlas-embed-social-button, .atlas-embed-carousel-nav,\n.atlas-embed-handle-back, .atlas-embed-step-back, .atlas-embed-password-toggle,\n.atlas-embed-input, .atlas-embed-code-box {\n transition:\n transform var(--_motion) ease, box-shadow var(--_motion) ease,\n background-color var(--_motion) ease, border-color var(--_motion) ease,\n color var(--_motion) ease, filter var(--_motion) ease, outline-color var(--_motion) ease;\n}\n\n/* Primary CTA \u2014 a subtle hover darken by default (was static). */\n.atlas-embed-button:hover:not(:disabled) { filter: brightness(1.06); }\n\n/* Button fill style (primary CTA only \u2014 social buttons keep provider styling). */\n.atlas-embed-root[data-button-style=\"outline\"] .atlas-embed-button {\n background: transparent; color: var(--_primary); border: 1px solid var(--_primary);\n}\n.atlas-embed-root[data-button-style=\"outline\"] .atlas-embed-button:hover:not(:disabled) {\n filter: none; background: color-mix(in srgb, var(--_primary) 10%, transparent);\n}\n.atlas-embed-root[data-button-style=\"soft\"] .atlas-embed-button {\n background: color-mix(in srgb, var(--_primary) 14%, transparent); color: var(--_primary);\n}\n.atlas-embed-root[data-button-style=\"soft\"] .atlas-embed-button:hover:not(:disabled) {\n filter: none; background: color-mix(in srgb, var(--_primary) 22%, transparent);\n}\n.atlas-embed-root[data-button-style=\"ghost\"] .atlas-embed-button {\n background: transparent; color: var(--_primary);\n}\n.atlas-embed-root[data-button-style=\"ghost\"] .atlas-embed-button:hover:not(:disabled) {\n filter: none; background: color-mix(in srgb, var(--_primary) 12%, transparent);\n}\n\n/* Press/hover effect \u2014 applies to every button. */\n.atlas-embed-root[data-button-effect=\"scale\"] .atlas-embed-button:active:not(:disabled),\n.atlas-embed-root[data-button-effect=\"scale\"] .atlas-embed-social-button:active,\n.atlas-embed-root[data-button-effect=\"scale\"] .atlas-embed-carousel-nav:active:not(:disabled) {\n transform: scale(0.97);\n}\n.atlas-embed-root[data-button-effect=\"lift\"] .atlas-embed-button:hover:not(:disabled),\n.atlas-embed-root[data-button-effect=\"lift\"] .atlas-embed-social-button:hover {\n transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.14); filter: none;\n}\n.atlas-embed-root[data-button-effect=\"lift\"] .atlas-embed-button:active:not(:disabled),\n.atlas-embed-root[data-button-effect=\"lift\"] .atlas-embed-social-button:active { transform: translateY(0); }\n.atlas-embed-root[data-button-effect=\"glow\"] .atlas-embed-button:hover:not(:disabled),\n.atlas-embed-root[data-button-effect=\"glow\"] .atlas-embed-social-button:hover {\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--_primary) 35%, transparent); filter: none;\n}\n/* Ripple \u2014 the widget appends a span on pointer-down; buttons must clip it. */\n.atlas-embed-root[data-button-effect=\"ripple\"] .atlas-embed-button,\n.atlas-embed-root[data-button-effect=\"ripple\"] .atlas-embed-social-button {\n position: relative; overflow: hidden;\n}\n.atlas-embed-ripple {\n position: absolute; border-radius: 50%; transform: scale(0);\n background: currentColor; opacity: 0.28; pointer-events: none;\n animation: atlas-embed-ripple 0.55s ease-out;\n}\n@keyframes atlas-embed-ripple { to { transform: scale(2.6); opacity: 0; } }\n\n/* Card + solid-button elevation. */\n.atlas-embed-root[data-shadow=\"none\"] .atlas-embed-card { box-shadow: none; }\n.atlas-embed-root[data-shadow=\"sm\"] .atlas-embed-card { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }\n.atlas-embed-root[data-shadow=\"lg\"] .atlas-embed-card {\n box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 16px 48px rgba(0,0,0,0.12);\n}\n\n/* Density \u2014 compact tightens padding and gaps. */\n.atlas-embed-root[data-density=\"compact\"] .atlas-embed-card { padding: 20px 18px; }\n.atlas-embed-root[data-density=\"compact\"] .atlas-embed-social { gap: 6px; margin-bottom: 12px; }\n.atlas-embed-root[data-density=\"compact\"] .atlas-embed-field { margin-bottom: 9px; }\n.atlas-embed-root[data-density=\"compact\"] .atlas-embed-button { padding: 9px 12px; }\n.atlas-embed-root[data-density=\"compact\"] .atlas-embed-social-button { padding: 8px 10px; }\n.atlas-embed-root[data-density=\"compact\"] .atlas-embed-subtitle { margin-bottom: 14px; }\n\n/* Input style \u2014 filled and underline treatments (default is the outlined field). */\n.atlas-embed-root[data-input-style=\"filled\"] .atlas-embed-input,\n.atlas-embed-root[data-input-style=\"filled\"] .atlas-embed-code-box,\n.atlas-embed-root[data-input-style=\"filled\"] .atlas-embed-social-search {\n background: color-mix(in srgb, var(--_border) 24%, transparent); border-color: transparent;\n}\n.atlas-embed-root[data-input-style=\"filled\"] .atlas-embed-input:focus,\n.atlas-embed-root[data-input-style=\"filled\"] .atlas-embed-code-box:focus,\n.atlas-embed-root[data-input-style=\"filled\"] .atlas-embed-social-search:focus {\n background: var(--_bg); border-color: var(--_primary);\n}\n.atlas-embed-root[data-input-style=\"underline\"] .atlas-embed-input,\n.atlas-embed-root[data-input-style=\"underline\"] .atlas-embed-code-box,\n.atlas-embed-root[data-input-style=\"underline\"] .atlas-embed-social-search {\n background: transparent; border: 0; border-bottom: 1.5px solid var(--_border);\n border-radius: 0; padding-left: 2px; padding-right: 2px;\n}\n.atlas-embed-root[data-input-style=\"underline\"] .atlas-embed-input:focus,\n.atlas-embed-root[data-input-style=\"underline\"] .atlas-embed-code-box:focus,\n.atlas-embed-root[data-input-style=\"underline\"] .atlas-embed-social-search:focus {\n outline: none; border-bottom-color: var(--_primary);\n}\n\n/* \u2500\u2500 Loading states \u2014 spinner / skeleton / dots / bar (interaction.loading).\n Shown while appearance resolves, while a redirect ticket is exchanged, and the\n button spinner while a form submits \u2014 so the widget never flashes blank. \u2500\u2500 */\n.atlas-embed-button { display: flex; align-items: center; justify-content: center; gap: 8px; }\n.atlas-embed-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 168px; padding: 12px 0; }\n.atlas-embed-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }\n\n/* Spinner (default) + the in-button spinner. */\n.atlas-embed-spinner, .atlas-embed-btn-spinner {\n border-radius: 50%; border-style: solid; flex: none;\n animation: atlas-embed-spin 0.7s linear infinite;\n}\n.atlas-embed-spinner { width: 30px; height: 30px; border-width: 3px;\n border-color: color-mix(in srgb, var(--_primary) 22%, transparent); border-top-color: var(--_primary); }\n.atlas-embed-btn-spinner { width: 17px; height: 17px; border-width: 2px;\n border-color: color-mix(in srgb, currentColor 35%, transparent); border-top-color: currentColor; }\n@keyframes atlas-embed-spin { to { transform: rotate(360deg); } }\n\n/* Dots. */\n.atlas-embed-loading[data-loading=\"dots\"] { flex-direction: row; }\n.atlas-embed-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--_primary);\n animation: atlas-embed-bounce 1.2s ease-in-out infinite; }\n.atlas-embed-dot:nth-child(2) { animation-delay: 0.15s; }\n.atlas-embed-dot:nth-child(3) { animation-delay: 0.30s; }\n@keyframes atlas-embed-bounce { 0%,80%,100% { transform: scale(0.5); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }\n\n/* Indeterminate bar. */\n.atlas-embed-loading[data-loading=\"bar\"] { min-height: 132px; }\n.atlas-embed-loadbar { position: relative; width: 64%; height: 4px; border-radius: 999px; overflow: hidden;\n background: color-mix(in srgb, var(--_border) 60%, transparent); }\n.atlas-embed-loadbar::before { content: \"\"; position: absolute; top: 0; bottom: 0; width: 40%; border-radius: 999px;\n background: var(--_primary); animation: atlas-embed-slide 1.1s ease-in-out infinite; }\n@keyframes atlas-embed-slide { 0% { left: -45%; } 100% { left: 105%; } }\n\n/* Skeleton \u2014 placeholders shaped like the form. */\n.atlas-embed-loading[data-loading=\"skeleton\"] { align-items: stretch; min-height: 0; gap: 12px; }\n.atlas-embed-skel { border-radius: var(--_radius); position: relative; overflow: hidden;\n background: color-mix(in srgb, var(--_border) 55%, transparent); }\n.atlas-embed-skel::after { content: \"\"; position: absolute; inset: 0; transform: translateX(-100%);\n background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--_text) 8%, transparent), transparent);\n animation: atlas-embed-shimmer 1.3s infinite; }\n.atlas-embed-skel-title { height: 22px; width: 55%; margin: 2px auto 2px; }\n.atlas-embed-skel-sub { height: 13px; width: 75%; margin: 0 auto 8px; }\n.atlas-embed-skel-input { height: 42px; }\n.atlas-embed-skel-button { height: 44px; margin-top: 6px; }\n@keyframes atlas-embed-shimmer { to { transform: translateX(100%); } }\n\n/* Reduced motion always wins \u2014 no transitions, presses, ripples, or spawn; and\n loaders swap their spin/bounce/slide/shimmer for a minimal opacity pulse. */\n@media (prefers-reduced-motion: reduce) {\n .atlas-embed-root { --_motion: 0s; }\n .atlas-embed-root [class^=\"atlas-embed-\"] { transition: none !important; }\n .atlas-embed-root .atlas-embed-button:active,\n .atlas-embed-root .atlas-embed-social-button:active { transform: none !important; }\n .atlas-embed-ripple { display: none; }\n .atlas-embed-spinner, .atlas-embed-btn-spinner, .atlas-embed-dot,\n .atlas-embed-loadbar::before, .atlas-embed-skel::after {\n animation: atlas-embed-pulse 1.4s ease-in-out infinite !important;\n }\n .atlas-embed-loadbar::before { position: static; width: 100%; }\n}\n@keyframes atlas-embed-pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }\n";
|
|
15
|
+
export declare const EMBED_CSS = "\n.atlas-embed-root {\n --_bg: var(--atlas-embed-color-background, #ffffff);\n --_card: var(--atlas-embed-color-card, #ffffff);\n --_text: var(--atlas-embed-color-text, #1c1c1f);\n --_primary: var(--atlas-embed-color-primary, #5b5bd6);\n --_on-primary: var(--atlas-embed-color-text-on-primary, #ffffff);\n /* Keyboard focus ring \u2014 a solid outline. The widget sets it to the primary\n adjusted to 3:1 on the card/background (or the page's explicit ring). */\n --_focus: var(--atlas-embed-color-focus-ring, var(--_primary));\n --_border: var(--atlas-embed-color-border, #e4e4e9);\n --_radius: var(--atlas-embed-border-radius, 10px);\n /* Transition tempo \u2014 the widget sets --atlas-embed-motion from motionSpeed and\n to 0s when animations are off; reduced-motion forces 0s below regardless. */\n --_motion: var(--atlas-embed-motion, 0.16s);\n font-family: var(--atlas-embed-font-family, ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif);\n color: var(--_text);\n box-sizing: border-box;\n display: block;\n}\n.atlas-embed-root *, .atlas-embed-root *::before, .atlas-embed-root *::after { box-sizing: border-box; }\n.atlas-embed-card {\n max-width: 400px;\n margin: 0 auto;\n padding: 28px 26px;\n background: var(--_card);\n border: 1px solid var(--_border);\n border-radius: calc(var(--_radius) + 4px);\n box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 28px rgba(0,0,0,0.06);\n}\n.atlas-embed-logo { display: block; max-height: 40px; margin: 0 auto 16px; }\n.atlas-embed-title { font-size: 20px; font-weight: 650; text-align: center; margin: 0 0 4px; }\n.atlas-embed-subtitle { font-size: 14px; color: #6b7280; text-align: center; margin: 0 0 20px; }\n.atlas-embed-social { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }\n.atlas-embed-social-button {\n display: flex; align-items: center; justify-content: center; gap: 8px;\n width: 100%; padding: 10px 12px; font-size: 14px; font-weight: 550; cursor: pointer;\n color: var(--_text); background: var(--_card);\n border: 1px solid var(--_border); border-radius: var(--_radius);\n}\n.atlas-embed-social-button:hover { filter: brightness(0.97); }\n.atlas-embed-social-icon { display: inline-flex; flex: none; line-height: 0; }\n.atlas-embed-social-icon svg { width: 18px; height: 18px; display: block; }\n.atlas-embed-social-label { display: inline-block; }\n\n/* Size \u2014 button scale and icon size together. */\n.atlas-embed-social[data-size=\"sm\"] .atlas-embed-social-button { padding: 8px 10px; font-size: 13px; }\n.atlas-embed-social[data-size=\"sm\"] .atlas-embed-social-icon svg { width: 16px; height: 16px; }\n.atlas-embed-social[data-size=\"lg\"] .atlas-embed-social-button { padding: 13px 16px; font-size: 15px; }\n.atlas-embed-social[data-size=\"lg\"] .atlas-embed-social-icon svg { width: 22px; height: 22px; }\n\n/* Icon-only variant: a square button, name in the tooltip. Always laid out as a\n centred wrap (or a carousel), never a full-width bar. */\n.atlas-embed-social-button[data-variant=\"icon\"] { width: auto; padding: 10px; aspect-ratio: 1; }\n.atlas-embed-social[data-size=\"sm\"] .atlas-embed-social-button[data-variant=\"icon\"] { padding: 8px; }\n.atlas-embed-social[data-size=\"lg\"] .atlas-embed-social-button[data-variant=\"icon\"] { padding: 13px; }\n.atlas-embed-social[data-variant=\"icon\"]:not([data-layout=\"carousel\"]) {\n flex-direction: row; flex-wrap: wrap; justify-content: center;\n}\n\n/* Grid \u2014 bars share a row and wrap. */\n.atlas-embed-social[data-layout=\"grid\"] { flex-direction: row; flex-wrap: wrap; }\n.atlas-embed-social[data-layout=\"grid\"] .atlas-embed-social-button { width: auto; flex: 1 1 auto; }\n.atlas-embed-social[data-layout=\"grid\"] .atlas-embed-social-button[data-variant=\"icon\"] { flex: 0 0 auto; }\n\n/* Carousel \u2014 one swipeable, scroll-snapped row. The raw scrollbar is hidden; the\n arrow buttons (below) are the affordance instead. */\n.atlas-embed-social[data-layout=\"carousel\"] {\n flex-direction: row; flex-wrap: nowrap; overflow-x: auto;\n scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scroll-behavior: smooth;\n scrollbar-width: none;\n}\n.atlas-embed-social[data-layout=\"carousel\"]::-webkit-scrollbar { display: none; }\n.atlas-embed-social[data-layout=\"carousel\"] .atlas-embed-social-button { width: auto; flex: 0 0 auto; scroll-snap-align: start; }\n.atlas-embed-social[data-layout=\"carousel\"] .atlas-embed-social-button[data-variant=\"block\"] { min-width: 60%; }\n\n/* Carousel shell \u2014 prev/next controls flanking the scroll row. */\n.atlas-embed-carousel { position: relative; display: flex; align-items: center; gap: 4px; margin-bottom: 16px; }\n.atlas-embed-carousel .atlas-embed-social { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }\n.atlas-embed-carousel-nav {\n flex: none; display: inline-flex; align-items: center; justify-content: center;\n width: 30px; height: 30px; padding: 0; cursor: pointer;\n color: var(--_text); background: var(--_card);\n border: 1px solid var(--_border); border-radius: 999px; transition: opacity 0.15s;\n}\n.atlas-embed-carousel-nav svg { width: 16px; height: 16px; display: block; }\n.atlas-embed-carousel-nav:hover:not(:disabled) { filter: brightness(0.97); }\n.atlas-embed-carousel-nav:disabled { opacity: 0.35; cursor: default; }\n/* Nothing overflows \u2192 no controls at all. */\n.atlas-embed-carousel[data-overflow=\"false\"] .atlas-embed-carousel-nav { display: none; }\n/* When the carousel sits inside a search field, the field owns the bottom margin. */\n.atlas-embed-social-field .atlas-embed-carousel { margin-bottom: 0; }\n\n/* Search \u2014 a filter box above a long provider list (socialButtons.search). The\n field wraps the button container so its own margin replaces the button block's. */\n.atlas-embed-social-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }\n.atlas-embed-social-field .atlas-embed-social { margin-bottom: 0; }\n.atlas-embed-social-search {\n width: 100%; padding: 9px 12px; font-size: 16px; color: var(--_text);\n background: var(--_bg); border: 1px solid var(--_border); border-radius: var(--_radius);\n}\n.atlas-embed-social-search:focus { outline: 2px solid var(--_focus); outline-offset: -1px; }\n.atlas-embed-social-button[hidden] { display: none; }\n.atlas-embed-social-empty { font-size: 13px; color: #9ca3af; text-align: center; padding: 6px 0; }\n.atlas-embed-social-empty[hidden] { display: none; }\n.atlas-embed-divider {\n display: flex; align-items: center; text-align: center; gap: 10px;\n color: #9ca3af; font-size: 12px; margin: 14px 0;\n}\n.atlas-embed-divider::before, .atlas-embed-divider::after {\n content: \"\"; flex: 1; height: 1px; background: var(--_border);\n}\n.atlas-embed-field { display: block; margin: 0 0 12px; }\n.atlas-embed-label { display: block; font-size: 13px; margin: 0 0 5px; color: var(--_text); }\n.atlas-embed-input {\n /* 16px: iOS Safari zooms the page when a smaller field takes focus. */\n width: 100%; padding: 10px 12px; font-size: 16px; color: var(--_text);\n background: var(--_bg); border: 1px solid var(--_border); border-radius: var(--_radius);\n}\n.atlas-embed-input:focus { outline: 2px solid var(--_focus); outline-offset: -1px; }\n/* Password field with a show/hide toggle. */\n.atlas-embed-password { position: relative; display: flex; align-items: center; }\n.atlas-embed-password .atlas-embed-input { width: 100%; padding-right: 54px; }\n.atlas-embed-password-toggle {\n position: absolute; right: 6px; padding: 4px 7px; font: inherit; font-size: 12px; font-weight: 600;\n cursor: pointer; color: var(--_primary); background: none; border: 0; border-radius: 6px;\n}\n.atlas-embed-password-toggle:hover { text-decoration: underline; }\nselect.atlas-embed-input { appearance: auto; }\n.atlas-embed-field-checkbox { display: flex; flex-direction: row-reverse; align-items: center; justify-content: flex-end; gap: 8px; }\n.atlas-embed-field-checkbox .atlas-embed-label { margin: 0; }\n.atlas-embed-checkbox { width: 16px; height: 16px; margin: 0; flex: none; }\ntextarea.atlas-embed-input { min-height: 72px; resize: vertical; font-family: inherit; }\nfieldset.atlas-embed-field { border: 0; padding: 0; margin: 0 0 12px; }\n.atlas-embed-choices { display: flex; flex-direction: column; gap: 6px; }\n.atlas-embed-choice { display: flex; flex-direction: row; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }\n.atlas-embed-choice input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--_primary); }\n.atlas-embed-button {\n width: 100%; margin-top: 6px; padding: 11px 12px; font-size: 14px; font-weight: 650;\n cursor: pointer; color: var(--_on-primary); background: var(--_primary);\n border: 0; border-radius: var(--_radius);\n}\n.atlas-embed-button:disabled { opacity: 0.6; cursor: default; }\n.atlas-embed-button:focus-visible, .atlas-embed-social-button:focus-visible,\n.atlas-embed-handle-back:focus-visible, .atlas-embed-step-back:focus-visible,\n.atlas-embed-password-toggle:focus-visible, .atlas-embed-carousel-nav:focus-visible {\n outline: 2px solid var(--_focus); outline-offset: 2px;\n}\n.atlas-embed-handle-back {\n width: 100%; margin-top: 8px; padding: 6px; font-size: 13px; font-weight: 550;\n cursor: pointer; color: #6b7280; background: none; border: 0;\n}\n.atlas-embed-handle-back:hover { color: #374151; }\n.atlas-embed-error { display: block; font-size: 13px; color: #d64545; margin: 6px 0 0; }\n.atlas-embed-form-error { font-size: 13px; color: #d64545; margin: 0 0 12px; min-height: 0; }\n/* A success/confirmation banner (e.g. after a force-login password reset). */\n.atlas-embed-flash {\n font-size: 13px; color: #0f7a4d; background: rgba(16,163,101,0.08);\n border: 1px solid rgba(16,163,101,0.25); border-radius: var(--_radius);\n padding: 9px 11px; margin: 0 0 14px; text-align: center;\n}\n.atlas-embed-footer { font-size: 13px; color: #6b7280; text-align: center; margin: 16px 0 0; }\n/* \u00A75.1 legal consent row on sign-up. */\n.atlas-embed-consent { display: flex; align-items: flex-start; gap: 8px; margin: 2px 0 14px; font-size: 13px; color: #6b7280; }\n.atlas-embed-consent-check { margin: 2px 0 0; width: 15px; height: 15px; flex: none; accent-color: var(--_primary); cursor: pointer; }\n.atlas-embed-consent-link { color: var(--_primary); text-decoration: underline; }\n/* \u00A77.5 Remember-me row. */\n.atlas-embed-remember { display: flex; align-items: center; gap: 8px; margin: -2px 0 14px; font-size: 13px; color: var(--_text); cursor: pointer; }\n.atlas-embed-remember-check { width: 15px; height: 15px; flex: none; accent-color: var(--_primary); cursor: pointer; }\n.atlas-embed-note { font-size: 14px; color: #6b7280; text-align: center; margin: 8px 0; }\n.atlas-embed-mfa-qr { display: block; margin: 8px auto; width: 180px; height: 180px; image-rendering: pixelated; }\n.atlas-embed-mfa-key { font-family: ui-monospace, monospace; letter-spacing: 0.05em; }\n\n/* Verification step \u2014 a continuation of the email panel, not a new screen: the\n context line (\"Enter the code we sent to \u2026\") + a way back, then a segmented\n one-box-per-digit code input that spawns in. */\n.atlas-embed-step-context { text-align: center; margin: 0 0 20px; }\n.atlas-embed-step-context .atlas-embed-subtitle { margin: 0 0 6px; }\n.atlas-embed-step-back {\n display: inline-block; padding: 2px 4px; font: inherit; font-size: 13px; font-weight: 550;\n cursor: pointer; color: var(--_primary); background: none; border: 0;\n}\n.atlas-embed-step-back:hover { text-decoration: underline; }\n/* A standalone action under the submit button (Forgot password?, Back to sign in,\n the 2FA toggle) reads as a centred link, not a left-aligned fragment. */\nform > .atlas-embed-step-back { display: block; width: 100%; text-align: center; margin-top: 10px; }\n.atlas-embed-code { display: flex; gap: 8px; justify-content: space-between; }\n.atlas-embed-code-box {\n flex: 1 1 0; min-width: 0; aspect-ratio: 1 / 1.15; padding: 0; text-align: center;\n font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--_text);\n background: var(--_bg); border: 1px solid var(--_border); border-radius: var(--_radius);\n}\n.atlas-embed-code-box:focus { outline: 2px solid var(--_focus); outline-offset: -1px; }\n/* A real step change eases its content in; error/busy re-renders (same step) do\n not, and a reduced-motion viewer gets no animation at all. */\n@media (prefers-reduced-motion: no-preference) {\n .atlas-embed-card[data-enter] > form,\n .atlas-embed-card[data-enter] > .atlas-embed-step-context {\n animation: atlas-embed-spawn 0.26s cubic-bezier(0.22, 0.61, 0.36, 1) both;\n }\n}\n@keyframes atlas-embed-spawn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }\n\n/* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n Interaction / polish layer \u2014 how controls FEEL. Driven by data-attributes on\n the root (data-button-style / -button-effect / -shadow / -density /\n -input-style) that the widget sets from the resolved interaction config, plus\n the --_motion tempo var. Every rule is additive: with no attributes set the\n widget looks exactly as it did before this layer existed.\n \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n/* Smooth every interactive control at the configured tempo. */\n.atlas-embed-button, .atlas-embed-social-button, .atlas-embed-carousel-nav,\n.atlas-embed-handle-back, .atlas-embed-step-back, .atlas-embed-password-toggle,\n.atlas-embed-input, .atlas-embed-code-box {\n transition:\n transform var(--_motion) ease, box-shadow var(--_motion) ease,\n background-color var(--_motion) ease, border-color var(--_motion) ease,\n color var(--_motion) ease, filter var(--_motion) ease, outline-color var(--_motion) ease;\n}\n\n/* Primary CTA \u2014 a subtle hover darken by default (was static). */\n.atlas-embed-button:hover:not(:disabled) { filter: brightness(1.06); }\n\n/* Button fill style (primary CTA only \u2014 social buttons keep provider styling). */\n.atlas-embed-root[data-button-style=\"outline\"] .atlas-embed-button {\n background: transparent; color: var(--_primary); border: 1px solid var(--_primary);\n}\n.atlas-embed-root[data-button-style=\"outline\"] .atlas-embed-button:hover:not(:disabled) {\n filter: none; background: color-mix(in srgb, var(--_primary) 10%, transparent);\n}\n.atlas-embed-root[data-button-style=\"soft\"] .atlas-embed-button {\n background: color-mix(in srgb, var(--_primary) 14%, transparent); color: var(--_primary);\n}\n.atlas-embed-root[data-button-style=\"soft\"] .atlas-embed-button:hover:not(:disabled) {\n filter: none; background: color-mix(in srgb, var(--_primary) 22%, transparent);\n}\n.atlas-embed-root[data-button-style=\"ghost\"] .atlas-embed-button {\n background: transparent; color: var(--_primary);\n}\n.atlas-embed-root[data-button-style=\"ghost\"] .atlas-embed-button:hover:not(:disabled) {\n filter: none; background: color-mix(in srgb, var(--_primary) 12%, transparent);\n}\n\n/* Press/hover effect \u2014 applies to every button. */\n.atlas-embed-root[data-button-effect=\"scale\"] .atlas-embed-button:active:not(:disabled),\n.atlas-embed-root[data-button-effect=\"scale\"] .atlas-embed-social-button:active,\n.atlas-embed-root[data-button-effect=\"scale\"] .atlas-embed-carousel-nav:active:not(:disabled) {\n transform: scale(0.97);\n}\n.atlas-embed-root[data-button-effect=\"lift\"] .atlas-embed-button:hover:not(:disabled),\n.atlas-embed-root[data-button-effect=\"lift\"] .atlas-embed-social-button:hover {\n transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.14); filter: none;\n}\n.atlas-embed-root[data-button-effect=\"lift\"] .atlas-embed-button:active:not(:disabled),\n.atlas-embed-root[data-button-effect=\"lift\"] .atlas-embed-social-button:active { transform: translateY(0); }\n.atlas-embed-root[data-button-effect=\"glow\"] .atlas-embed-button:hover:not(:disabled),\n.atlas-embed-root[data-button-effect=\"glow\"] .atlas-embed-social-button:hover {\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--_primary) 35%, transparent); filter: none;\n}\n/* Ripple \u2014 the widget appends a span on pointer-down; buttons must clip it. */\n.atlas-embed-root[data-button-effect=\"ripple\"] .atlas-embed-button,\n.atlas-embed-root[data-button-effect=\"ripple\"] .atlas-embed-social-button {\n position: relative; overflow: hidden;\n}\n.atlas-embed-ripple {\n position: absolute; border-radius: 50%; transform: scale(0);\n background: currentColor; opacity: 0.28; pointer-events: none;\n animation: atlas-embed-ripple 0.55s ease-out;\n}\n@keyframes atlas-embed-ripple { to { transform: scale(2.6); opacity: 0; } }\n\n/* Card + solid-button elevation. */\n.atlas-embed-root[data-shadow=\"none\"] .atlas-embed-card { box-shadow: none; }\n.atlas-embed-root[data-shadow=\"sm\"] .atlas-embed-card { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }\n.atlas-embed-root[data-shadow=\"lg\"] .atlas-embed-card {\n box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 16px 48px rgba(0,0,0,0.12);\n}\n\n/* Density \u2014 compact tightens padding and gaps. */\n.atlas-embed-root[data-density=\"compact\"] .atlas-embed-card { padding: 20px 18px; }\n.atlas-embed-root[data-density=\"compact\"] .atlas-embed-social { gap: 6px; margin-bottom: 12px; }\n.atlas-embed-root[data-density=\"compact\"] .atlas-embed-field { margin-bottom: 9px; }\n.atlas-embed-root[data-density=\"compact\"] .atlas-embed-button { padding: 9px 12px; }\n.atlas-embed-root[data-density=\"compact\"] .atlas-embed-social-button { padding: 8px 10px; }\n.atlas-embed-root[data-density=\"compact\"] .atlas-embed-subtitle { margin-bottom: 14px; }\n\n/* Input style \u2014 filled and underline treatments (default is the outlined field). */\n.atlas-embed-root[data-input-style=\"filled\"] .atlas-embed-input,\n.atlas-embed-root[data-input-style=\"filled\"] .atlas-embed-code-box,\n.atlas-embed-root[data-input-style=\"filled\"] .atlas-embed-social-search {\n background: color-mix(in srgb, var(--_border) 24%, transparent); border-color: transparent;\n}\n.atlas-embed-root[data-input-style=\"filled\"] .atlas-embed-input:focus,\n.atlas-embed-root[data-input-style=\"filled\"] .atlas-embed-code-box:focus,\n.atlas-embed-root[data-input-style=\"filled\"] .atlas-embed-social-search:focus {\n background: var(--_bg); border-color: var(--_primary);\n}\n.atlas-embed-root[data-input-style=\"underline\"] .atlas-embed-input,\n.atlas-embed-root[data-input-style=\"underline\"] .atlas-embed-code-box,\n.atlas-embed-root[data-input-style=\"underline\"] .atlas-embed-social-search {\n background: transparent; border: 0; border-bottom: 1.5px solid var(--_border);\n border-radius: 0; padding-left: 2px; padding-right: 2px;\n}\n.atlas-embed-root[data-input-style=\"underline\"] .atlas-embed-input:focus,\n.atlas-embed-root[data-input-style=\"underline\"] .atlas-embed-code-box:focus,\n.atlas-embed-root[data-input-style=\"underline\"] .atlas-embed-social-search:focus {\n outline: none; border-bottom-color: var(--_primary);\n}\n\n/* \u2500\u2500 Loading states \u2014 spinner / skeleton / dots / bar (interaction.loading).\n Shown while appearance resolves, while a redirect ticket is exchanged, and the\n button spinner while a form submits \u2014 so the widget never flashes blank. \u2500\u2500 */\n.atlas-embed-button { display: flex; align-items: center; justify-content: center; gap: 8px; }\n.atlas-embed-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 168px; padding: 12px 0; }\n.atlas-embed-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }\n\n/* Spinner (default) + the in-button spinner. */\n.atlas-embed-spinner, .atlas-embed-btn-spinner {\n border-radius: 50%; border-style: solid; flex: none;\n animation: atlas-embed-spin 0.7s linear infinite;\n}\n.atlas-embed-spinner { width: 30px; height: 30px; border-width: 3px;\n border-color: color-mix(in srgb, var(--_primary) 22%, transparent); border-top-color: var(--_primary); }\n.atlas-embed-btn-spinner { width: 17px; height: 17px; border-width: 2px;\n border-color: color-mix(in srgb, currentColor 35%, transparent); border-top-color: currentColor; }\n@keyframes atlas-embed-spin { to { transform: rotate(360deg); } }\n\n/* Dots. */\n.atlas-embed-loading[data-loading=\"dots\"] { flex-direction: row; }\n.atlas-embed-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--_primary);\n animation: atlas-embed-bounce 1.2s ease-in-out infinite; }\n.atlas-embed-dot:nth-child(2) { animation-delay: 0.15s; }\n.atlas-embed-dot:nth-child(3) { animation-delay: 0.30s; }\n@keyframes atlas-embed-bounce { 0%,80%,100% { transform: scale(0.5); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }\n\n/* Indeterminate bar. */\n.atlas-embed-loading[data-loading=\"bar\"] { min-height: 132px; }\n.atlas-embed-loadbar { position: relative; width: 64%; height: 4px; border-radius: 999px; overflow: hidden;\n background: color-mix(in srgb, var(--_border) 60%, transparent); }\n.atlas-embed-loadbar::before { content: \"\"; position: absolute; top: 0; bottom: 0; width: 40%; border-radius: 999px;\n background: var(--_primary); animation: atlas-embed-slide 1.1s ease-in-out infinite; }\n@keyframes atlas-embed-slide { 0% { left: -45%; } 100% { left: 105%; } }\n\n/* Skeleton \u2014 placeholders shaped like the form. */\n.atlas-embed-loading[data-loading=\"skeleton\"] { align-items: stretch; min-height: 0; gap: 12px; }\n.atlas-embed-skel { border-radius: var(--_radius); position: relative; overflow: hidden;\n background: color-mix(in srgb, var(--_border) 55%, transparent); }\n.atlas-embed-skel::after { content: \"\"; position: absolute; inset: 0; transform: translateX(-100%);\n background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--_text) 8%, transparent), transparent);\n animation: atlas-embed-shimmer 1.3s infinite; }\n.atlas-embed-skel-title { height: 22px; width: 55%; margin: 2px auto 2px; }\n.atlas-embed-skel-sub { height: 13px; width: 75%; margin: 0 auto 8px; }\n.atlas-embed-skel-input { height: 42px; }\n.atlas-embed-skel-button { height: 44px; margin-top: 6px; }\n@keyframes atlas-embed-shimmer { to { transform: translateX(100%); } }\n\n/* Reduced motion always wins \u2014 no transitions, presses, ripples, or spawn; and\n loaders swap their spin/bounce/slide/shimmer for a minimal opacity pulse. */\n@media (prefers-reduced-motion: reduce) {\n .atlas-embed-root { --_motion: 0s; }\n .atlas-embed-root [class^=\"atlas-embed-\"] { transition: none !important; }\n .atlas-embed-root .atlas-embed-button:active,\n .atlas-embed-root .atlas-embed-social-button:active { transform: none !important; }\n .atlas-embed-ripple { display: none; }\n .atlas-embed-spinner, .atlas-embed-btn-spinner, .atlas-embed-dot,\n .atlas-embed-loadbar::before, .atlas-embed-skel::after {\n animation: atlas-embed-pulse 1.4s ease-in-out infinite !important;\n }\n .atlas-embed-loadbar::before { position: static; width: 100%; }\n}\n@keyframes atlas-embed-pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }\n";
|
|
16
16
|
/** Inject the sheet once per document. Safe to call on every mount. */
|
|
17
17
|
export declare function injectStyles(doc?: Document): void;
|
package/dist/styles.js
CHANGED
|
@@ -186,6 +186,8 @@ fieldset.atlas-embed-field { border: 0; padding: 0; margin: 0 0 12px; }
|
|
|
186
186
|
.atlas-embed-remember { display: flex; align-items: center; gap: 8px; margin: -2px 0 14px; font-size: 13px; color: var(--_text); cursor: pointer; }
|
|
187
187
|
.atlas-embed-remember-check { width: 15px; height: 15px; flex: none; accent-color: var(--_primary); cursor: pointer; }
|
|
188
188
|
.atlas-embed-note { font-size: 14px; color: #6b7280; text-align: center; margin: 8px 0; }
|
|
189
|
+
.atlas-embed-mfa-qr { display: block; margin: 8px auto; width: 180px; height: 180px; image-rendering: pixelated; }
|
|
190
|
+
.atlas-embed-mfa-key { font-family: ui-monospace, monospace; letter-spacing: 0.05em; }
|
|
189
191
|
|
|
190
192
|
/* Verification step — a continuation of the email panel, not a new screen: the
|
|
191
193
|
context line ("Enter the code we sent to …") + a way back, then a segmented
|
package/dist/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":";;;AAsYA,oCAMC;AA5YD;;;;;;;;;;;;GAYG;AACU,QAAA,YAAY,GAAG,oBAAoB,CAAC;AAEpC,QAAA,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoXxB,CAAC;AAEF,uEAAuE;AACvE,SAAgB,YAAY,CAAC,MAAgB,QAAQ;IACnD,IAAI,GAAG,CAAC,aAAa,CAAC,cAAc,oBAAY,GAAG,CAAC;QAAE,OAAO;IAC7D,MAAM,KAAK,GAAG,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACzC,KAAK,CAAC,YAAY,CAAC,QAAQ,oBAAY,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/C,KAAK,CAAC,WAAW,GAAG,iBAAS,CAAC;IAC9B,CAAC,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,eAAe,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACvD,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { AtlasSdkInfo } from '@atlasauth/js';
|
|
2
2
|
/** This package's version, sent as `X-Atlas-SDK` (kept in step with package.json by a test). */
|
|
3
|
-
export declare const ATLAS_EMBED_VERSION = "0.
|
|
3
|
+
export declare const ATLAS_EMBED_VERSION = "0.10.0";
|
|
4
4
|
export declare const ATLAS_EMBED_SDK: AtlasSdkInfo;
|
package/dist/version.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ATLAS_EMBED_SDK = exports.ATLAS_EMBED_VERSION = void 0;
|
|
4
4
|
/** This package's version, sent as `X-Atlas-SDK` (kept in step with package.json by a test). */
|
|
5
|
-
exports.ATLAS_EMBED_VERSION = '0.
|
|
5
|
+
exports.ATLAS_EMBED_VERSION = '0.10.0';
|
|
6
6
|
exports.ATLAS_EMBED_SDK = { name: '@atlasauth/embed', version: exports.ATLAS_EMBED_VERSION };
|
|
7
7
|
//# sourceMappingURL=version.js.map
|
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAEA,gGAAgG;AACnF,QAAA,mBAAmB,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAEA,gGAAgG;AACnF,QAAA,mBAAmB,GAAG,QAAQ,CAAC;AAC/B,QAAA,eAAe,GAAiB,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,2BAAmB,EAAE,CAAC"}
|
package/dist/widget/flow.d.ts
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import type { AtlasWidget } from '../widget';
|
|
2
|
+
import type { CaptchaFlowKey } from '../appearance';
|
|
3
|
+
/**
|
|
4
|
+
* §5 obtain a captcha token for a flow, mounting the challenge OUTSIDE `w.root`
|
|
5
|
+
* (render() wipes root on every paint, so a host inside it would vanish). The
|
|
6
|
+
* host is removed as soon as the token resolves. Returns null when no token is
|
|
7
|
+
* needed or the provider isn't one the widget renders — the server still fails
|
|
8
|
+
* closed if it required one, surfacing the normal CAPTCHA_REQUIRED error.
|
|
9
|
+
*
|
|
10
|
+
* `always` renders even when the flow's always-on flag is off — used for a
|
|
11
|
+
* risk-triggered sign-in challenge, where the server demands a token mid-flow
|
|
12
|
+
* regardless of the per-flow toggle.
|
|
13
|
+
*/
|
|
14
|
+
export declare function captchaToken(w: AtlasWidget, key: CaptchaFlowKey, always?: boolean): Promise<string | null>;
|
|
2
15
|
export declare function handleRedirectLanding(w: AtlasWidget): Promise<boolean>;
|
|
3
16
|
/** Redeem a ticket for the session cookies. Resolves whether a session was set. */
|
|
4
17
|
export declare function exchange(w: AtlasWidget, attemptId: string, ticket: string): Promise<boolean>;
|
|
@@ -14,6 +27,8 @@ export declare function complete(w: AtlasWidget, attemptId: string | null): Prom
|
|
|
14
27
|
*/
|
|
15
28
|
export declare function beacon(w: AtlasWidget, attemptId?: string | null): void;
|
|
16
29
|
export declare function submit(w: AtlasWidget, values: Record<string, string>, emailInstead?: 'email_code' | 'email_link'): Promise<void>;
|
|
30
|
+
/** "I've saved my codes": forget the recovery codes, then exchange the ticket and finish. */
|
|
31
|
+
export declare function saveRecoveryCodes(w: AtlasWidget): Promise<void>;
|
|
17
32
|
/**
|
|
18
33
|
* §5.3 send (or resend) the emailed code or link for the current first-factor
|
|
19
34
|
* step. A refusal (a 429, or an app that cannot send email) stays on the step
|
|
@@ -21,6 +36,11 @@ export declare function submit(w: AtlasWidget, values: Record<string, string>, e
|
|
|
21
36
|
* the link is opened on any device.
|
|
22
37
|
*/
|
|
23
38
|
export declare function sendEmailFactor(w: AtlasWidget, strategy: 'email_code' | 'email_link', rerender?: boolean): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Resend a sign-up's emailed proof (code or link — the earlier one stops
|
|
41
|
+
* working); a refusal (a 429) stays on the step with the server's error.
|
|
42
|
+
*/
|
|
43
|
+
export declare function resendSignUp(w: AtlasWidget): Promise<void>;
|
|
24
44
|
export declare function startOAuth(w: AtlasWidget, provider: string, identifier?: string): Promise<void>;
|
|
25
45
|
/**
|
|
26
46
|
* Start a "Sign in with Atlas" (or any SSO connection) sign-in: POST the
|
package/dist/widget/flow.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.captchaToken = captchaToken;
|
|
3
4
|
exports.handleRedirectLanding = handleRedirectLanding;
|
|
4
5
|
exports.exchange = exchange;
|
|
5
6
|
exports.complete = complete;
|
|
6
7
|
exports.beacon = beacon;
|
|
7
8
|
exports.submit = submit;
|
|
9
|
+
exports.saveRecoveryCodes = saveRecoveryCodes;
|
|
8
10
|
exports.sendEmailFactor = sendEmailFactor;
|
|
11
|
+
exports.resendSignUp = resendSignUp;
|
|
9
12
|
exports.startOAuth = startOAuth;
|
|
10
13
|
exports.startSso = startSso;
|
|
11
14
|
exports.completeIdToken = completeIdToken;
|
|
@@ -29,7 +32,7 @@ const render_1 = require("./render");
|
|
|
29
32
|
*/
|
|
30
33
|
async function captchaToken(w, key, always = false) {
|
|
31
34
|
const flow = w.captchaFlows[key];
|
|
32
|
-
const wanted = always ? !!flow && (0, captcha_1.isRenderable)(flow.provider) : (0, captcha_1.flowNeedsCaptcha)(flow);
|
|
35
|
+
const wanted = always ? !!flow && (0, captcha_1.isRenderable)(flow.provider, flow) : (0, captcha_1.flowNeedsCaptcha)(flow);
|
|
33
36
|
if (!wanted || !flow)
|
|
34
37
|
return null;
|
|
35
38
|
const doc = w.root.ownerDocument ?? document;
|
|
@@ -254,6 +257,12 @@ async function submit(w, values, emailInstead) {
|
|
|
254
257
|
await sendEmailFactor(w, auto, false);
|
|
255
258
|
}
|
|
256
259
|
const attempt = w.state.attempt;
|
|
260
|
+
// An enrolment's recovery codes are shown first (render draws them);
|
|
261
|
+
// "I've saved my codes" (`saveRecoveryCodes`) finishes the sign-in.
|
|
262
|
+
if ((0, js_1.pendingRecoveryCodes)(w.state)) {
|
|
263
|
+
(0, render_1.render)(w);
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
257
266
|
if (attempt?.status === 'complete') {
|
|
258
267
|
const attemptId = attempt.id ?? null;
|
|
259
268
|
if (w.state.ticket && attemptId)
|
|
@@ -263,6 +272,22 @@ async function submit(w, values, emailInstead) {
|
|
|
263
272
|
}
|
|
264
273
|
(0, render_1.render)(w);
|
|
265
274
|
}
|
|
275
|
+
/** "I've saved my codes": forget the recovery codes, then exchange the ticket and finish. */
|
|
276
|
+
async function saveRecoveryCodes(w) {
|
|
277
|
+
if (w.busy || !(0, js_1.pendingRecoveryCodes)(w.state))
|
|
278
|
+
return;
|
|
279
|
+
w.state = (0, js_1.acknowledgeRecoveryCodes)(w.state);
|
|
280
|
+
const attemptId = w.state.attempt?.id ?? null;
|
|
281
|
+
w.busy = true;
|
|
282
|
+
try {
|
|
283
|
+
if (w.state.ticket && attemptId)
|
|
284
|
+
await exchange(w, attemptId, w.state.ticket);
|
|
285
|
+
}
|
|
286
|
+
finally {
|
|
287
|
+
w.busy = false;
|
|
288
|
+
}
|
|
289
|
+
await complete(w, attemptId);
|
|
290
|
+
}
|
|
266
291
|
/**
|
|
267
292
|
* §5.3 send (or resend) the emailed code or link for the current first-factor
|
|
268
293
|
* step. A refusal (a 429, or an app that cannot send email) stays on the step
|
|
@@ -287,6 +312,20 @@ async function sendEmailFactor(w, strategy, rerender = true) {
|
|
|
287
312
|
(0, render_1.render)(w);
|
|
288
313
|
}
|
|
289
314
|
}
|
|
315
|
+
/**
|
|
316
|
+
* Resend a sign-up's emailed proof (code or link — the earlier one stops
|
|
317
|
+
* working); a refusal (a 429) stays on the step with the server's error.
|
|
318
|
+
*/
|
|
319
|
+
async function resendSignUp(w) {
|
|
320
|
+
if (w.busy)
|
|
321
|
+
return;
|
|
322
|
+
w.busy = true;
|
|
323
|
+
(0, render_1.render)(w);
|
|
324
|
+
w.state = await (0, js_1.resendSignUpVerification)(w.client, w.state);
|
|
325
|
+
w.busy = false;
|
|
326
|
+
w.flash = w.state.errors.length === 0 ? 'We sent you a new email.' : null;
|
|
327
|
+
(0, render_1.render)(w);
|
|
328
|
+
}
|
|
290
329
|
function startLinkPoll(w) {
|
|
291
330
|
if (w.linkPoll)
|
|
292
331
|
clearInterval(w.linkPoll);
|
|
@@ -298,8 +337,13 @@ function startLinkPoll(w) {
|
|
|
298
337
|
w.linkPoll = null;
|
|
299
338
|
return;
|
|
300
339
|
}
|
|
340
|
+
const before = w.state.attempt?.status;
|
|
301
341
|
const { state, ticket } = await (0, js_1.pollAttempt)(w.client, w.state);
|
|
302
342
|
w.state = state;
|
|
343
|
+
// Moved on without a session yet (e.g. a passkey sign-up whose email was just
|
|
344
|
+
// proven): draw the new step.
|
|
345
|
+
if (!ticket && state.attempt && state.attempt.status !== before)
|
|
346
|
+
(0, render_1.render)(w);
|
|
303
347
|
if (!ticket || !state.attempt)
|
|
304
348
|
return;
|
|
305
349
|
if (w.linkPoll)
|
|
@@ -487,6 +531,9 @@ async function submitReset(w, values) {
|
|
|
487
531
|
}
|
|
488
532
|
const token = await captchaToken(w, 'passwordReset');
|
|
489
533
|
w.resetFlow = await (0, js_1.startPasswordReset)(w.client, values.email ?? '', token ?? undefined);
|
|
534
|
+
// A reset link may be opened anywhere: this tab follows the attempt.
|
|
535
|
+
if (w.resetFlow.attempt?.poll_secret)
|
|
536
|
+
startResetPoll(w);
|
|
490
537
|
}
|
|
491
538
|
else {
|
|
492
539
|
w.resetFlow = await (0, js_1.advancePasswordReset)(w.client, w.resetFlow, {
|
|
@@ -517,6 +564,36 @@ async function submitReset(w, values) {
|
|
|
517
564
|
}
|
|
518
565
|
(0, render_1.render)(w);
|
|
519
566
|
}
|
|
567
|
+
/**
|
|
568
|
+
* Link mode: follow a reset attempt while its emailed link is opened (perhaps
|
|
569
|
+
* on another device), then draw the step it reached (the second factor or the
|
|
570
|
+
* new password). Stops when the user leaves the reset, or it moves on.
|
|
571
|
+
*/
|
|
572
|
+
function startResetPoll(w) {
|
|
573
|
+
if (w.linkPoll)
|
|
574
|
+
clearInterval(w.linkPoll);
|
|
575
|
+
const attemptId = w.resetFlow?.attempt?.id;
|
|
576
|
+
w.linkPoll = setInterval(() => {
|
|
577
|
+
void (async () => {
|
|
578
|
+
const flow = w.resetFlow;
|
|
579
|
+
if (!flow?.attempt || flow.attempt.id !== attemptId || flow.attempt.status !== 'needs_email_verification') {
|
|
580
|
+
if (w.linkPoll)
|
|
581
|
+
clearInterval(w.linkPoll);
|
|
582
|
+
w.linkPoll = null;
|
|
583
|
+
return;
|
|
584
|
+
}
|
|
585
|
+
const next = await (0, js_1.pollPasswordReset)(w.client, flow);
|
|
586
|
+
// The user may have left the reset (or restarted it) while this was in flight.
|
|
587
|
+
if (w.resetFlow !== flow || next.attempt?.status === 'needs_email_verification')
|
|
588
|
+
return;
|
|
589
|
+
if (w.linkPoll)
|
|
590
|
+
clearInterval(w.linkPoll);
|
|
591
|
+
w.linkPoll = null;
|
|
592
|
+
w.resetFlow = next;
|
|
593
|
+
(0, render_1.render)(w);
|
|
594
|
+
})();
|
|
595
|
+
}, 2_000);
|
|
596
|
+
}
|
|
520
597
|
async function submitSignUp(w, values, consent = true) {
|
|
521
598
|
if (w.busy)
|
|
522
599
|
return;
|
|
@@ -546,6 +623,10 @@ async function submitSignUp(w, values, consent = true) {
|
|
|
546
623
|
await complete(w, attemptId);
|
|
547
624
|
return;
|
|
548
625
|
}
|
|
626
|
+
// Link mode (or both): the verification link may be opened anywhere; this
|
|
627
|
+
// tab collects the session by polling.
|
|
628
|
+
if ((0, js_1.shouldKeepPolling)(w.state))
|
|
629
|
+
startLinkPoll(w);
|
|
549
630
|
(0, render_1.render)(w);
|
|
550
631
|
}
|
|
551
632
|
//# sourceMappingURL=flow.js.map
|
package/dist/widget/flow.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow.js","sourceRoot":"","sources":["../../src/widget/flow.ts"],"names":[],"mappings":";;AA0FA,sDA2CC;AA+BD,4BAYC;AAOD,4BAwBC;AAQD,wBASC;AAED,wBAiFC;AAQD,0CAmBC;AAuBD,gCAqBC;AAYD,4BAqBC;AA6GD,0CAkBC;AAGD,gCAGC;AAGD,kCAwCC;AAED,oCA6BC;AA1mBD,sCAuBuB;AACvB,0CAA+C;AAG/C,uCAAgG;AAChG,qCAA4D;AAE5D;;;;;;;;;;GAUG;AACH,KAAK,UAAU,YAAY,CACzB,CAAc,EACd,GAAmB,EACnB,MAAM,GAAG,KAAK;IAEd,MAAM,IAAI,GAAG,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IACjC,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,IAAA,sBAAY,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAA,0BAAgB,EAAC,IAAI,CAAC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SAAS,GAAI,OAA2B,CAAC,EAAE,IAAI,IAAI,CAAC;QAC1D,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,SAAS;YAAE,MAAM,QAAQ,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC9E,MAAM,QAAQ,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;QAC7B,OAAO;IACT,CAAC;IACD,0EAA0E;IAC1E,uCAAuC;IACvC,IAAI,IAAA,sBAAiB,EAAC,CAAC,CAAC,KAAK,CAAC;QAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACjD,IAAA,eAAM,EAAC,CAAC,CAAC,CAAC;AACZ,CAAC"}
|
package/dist/widget/forms.js
CHANGED
|
@@ -13,6 +13,7 @@ const constants_1 = require("./constants");
|
|
|
13
13
|
const dom_1 = require("./dom");
|
|
14
14
|
const render_1 = require("./render");
|
|
15
15
|
const flow_1 = require("./flow");
|
|
16
|
+
const mfa_1 = require("./mfa");
|
|
16
17
|
/**
|
|
17
18
|
* §5.4 the reset sub-flow panel: email → emailed code → (2FA) → new password →
|
|
18
19
|
* signed in. Reuses the shared field builders + the segmented code input, and
|
|
@@ -32,10 +33,17 @@ function renderReset(w) {
|
|
|
32
33
|
let subtitle = null;
|
|
33
34
|
let submitLabel = 'Continue';
|
|
34
35
|
let showSubmit = true;
|
|
36
|
+
// How the instance emails the reset: a code, a link, or one email with both.
|
|
37
|
+
const delivery = w.account.passwordReset;
|
|
35
38
|
switch (step) {
|
|
36
39
|
case 'request':
|
|
37
|
-
subtitle =
|
|
38
|
-
|
|
40
|
+
subtitle =
|
|
41
|
+
delivery === 'link'
|
|
42
|
+
? 'Enter your email and we’ll send you a reset link.'
|
|
43
|
+
: delivery === 'both'
|
|
44
|
+
? 'Enter your email and we’ll send you a reset link and code.'
|
|
45
|
+
: 'Enter your email and we’ll send you a reset code.';
|
|
46
|
+
submitLabel = delivery === 'link' ? 'Send reset link' : 'Send reset code';
|
|
39
47
|
fieldInto(w, form, inputs, errors, 'email', 'Email address', 'email', 'username');
|
|
40
48
|
{
|
|
41
49
|
const emailField = inputs.get('email');
|
|
@@ -47,6 +55,27 @@ function renderReset(w) {
|
|
|
47
55
|
}
|
|
48
56
|
break;
|
|
49
57
|
case 'collect_email_code':
|
|
58
|
+
if (delivery === 'link') {
|
|
59
|
+
// Nothing to type: the link carries the proof, and this tab follows the
|
|
60
|
+
// attempt (it continues on its own once the link is opened, anywhere).
|
|
61
|
+
showSubmit = false;
|
|
62
|
+
subtitle = 'Check your email';
|
|
63
|
+
const note = (0, dom_1.el)(w, 'p', 'atlas-embed-note', w.enteredIdentifier
|
|
64
|
+
? `We sent a reset link to ${w.enteredIdentifier}. Open it on any device; this page continues on its own.`
|
|
65
|
+
: 'We sent you a reset link. Open it on any device; this page continues on its own.');
|
|
66
|
+
note.setAttribute('data-atlas-link-sent', '');
|
|
67
|
+
form.appendChild(note);
|
|
68
|
+
const again = (0, dom_1.el)(w, 'button', 'atlas-embed-step-back', 'Send another link');
|
|
69
|
+
again.type = 'button';
|
|
70
|
+
again.setAttribute('data-atlas-resend', '');
|
|
71
|
+
again.disabled = w.busy;
|
|
72
|
+
again.addEventListener('click', () => {
|
|
73
|
+
w.resetFlow = { ...js_1.initialResetFlow };
|
|
74
|
+
void (0, flow_1.submitReset)(w, { email: w.enteredIdentifier ?? '' });
|
|
75
|
+
});
|
|
76
|
+
form.appendChild(again);
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
50
79
|
subtitle = w.enteredIdentifier
|
|
51
80
|
? `Enter the code we sent to ${w.enteredIdentifier}`
|
|
52
81
|
: 'Enter the code we sent to your email';
|
|
@@ -212,6 +241,7 @@ function renderForm(w, stepKind) {
|
|
|
212
241
|
const addField = (name, label, type, autocomplete) => fieldInto(w, form, inputs, errors, name, label, type, autocomplete);
|
|
213
242
|
const addCodeField = (name, label, autofocus) => codeFieldInto(w, form, inputs, errors, name, label, autofocus);
|
|
214
243
|
let showSubmit = true;
|
|
244
|
+
let submitLabel = constants_1.COPY[w.mode].submit;
|
|
215
245
|
// Secondary actions drawn under the submit button (resend, other factors).
|
|
216
246
|
const trailing = [];
|
|
217
247
|
switch (stepKind) {
|
|
@@ -337,23 +367,53 @@ function renderForm(w, stepKind) {
|
|
|
337
367
|
row.appendChild((0, dom_1.el)(w, 'span', 'atlas-embed-remember-text', 'Remember this device'));
|
|
338
368
|
form.appendChild(row);
|
|
339
369
|
}
|
|
370
|
+
// "Text me a code instead" / "Email me a code instead", where the app offers them.
|
|
371
|
+
(0, mfa_1.renderSecondFactorAlternatives)(w, trailing);
|
|
340
372
|
break;
|
|
341
|
-
case 'collect_email_code':
|
|
342
|
-
|
|
373
|
+
case 'collect_email_code': {
|
|
374
|
+
const linkOnly = (0, js_1.awaitingSignUpLink)(w.state.attempt, w.account.emailVerification);
|
|
375
|
+
if (linkOnly) {
|
|
376
|
+
// Nothing to type: this tab polls and continues once the link is opened.
|
|
377
|
+
showSubmit = false;
|
|
378
|
+
const who = w.enteredIdentifier ?? w.state.attempt?.identifier ?? '';
|
|
379
|
+
const note = (0, dom_1.el)(w, 'p', 'atlas-embed-note', who
|
|
380
|
+
? `We sent a confirmation link to ${who}. Open it on any device; this page continues on its own.`
|
|
381
|
+
: 'We sent you a confirmation link. Open it on any device; this page continues on its own.');
|
|
382
|
+
note.setAttribute('data-atlas-link-sent', '');
|
|
383
|
+
form.appendChild(note);
|
|
384
|
+
}
|
|
385
|
+
else {
|
|
386
|
+
addCodeField('code', 'Verification code', true);
|
|
387
|
+
}
|
|
388
|
+
// A sign-up can ask for a fresh email (the earlier code / link stops working).
|
|
389
|
+
if (w.state.attempt?.object === 'sign_up_attempt') {
|
|
390
|
+
const again = (0, dom_1.el)(w, 'button', 'atlas-embed-step-back', linkOnly ? 'Resend link' : 'Resend code');
|
|
391
|
+
again.type = 'button';
|
|
392
|
+
again.setAttribute('data-atlas-resend', '');
|
|
393
|
+
again.disabled = w.busy;
|
|
394
|
+
again.addEventListener('click', () => void (0, flow_1.resendSignUp)(w));
|
|
395
|
+
trailing.push(again);
|
|
396
|
+
}
|
|
343
397
|
break;
|
|
398
|
+
}
|
|
344
399
|
case 'collect_new_password':
|
|
345
400
|
addField('password', 'New password', 'password', 'new-password');
|
|
346
401
|
break;
|
|
347
|
-
case 'enroll_second_factor':
|
|
348
|
-
|
|
349
|
-
|
|
402
|
+
case 'enroll_second_factor': {
|
|
403
|
+
// The authenticator app (QR code, setup key, its code) or a texted code.
|
|
404
|
+
const label = (0, mfa_1.renderEnrollment)(w, form, { addField, addCodeField, trailing }, submitLabel);
|
|
405
|
+
if (label === null)
|
|
406
|
+
showSubmit = false;
|
|
407
|
+
else
|
|
408
|
+
submitLabel = label;
|
|
350
409
|
break;
|
|
410
|
+
}
|
|
351
411
|
default:
|
|
352
412
|
showSubmit = false;
|
|
353
413
|
form.appendChild((0, dom_1.el)(w, 'p', 'atlas-embed-note', 'Please continue in your application.'));
|
|
354
414
|
}
|
|
355
415
|
if (showSubmit) {
|
|
356
|
-
form.appendChild((0, dom_1.submitButton)(w,
|
|
416
|
+
form.appendChild((0, dom_1.submitButton)(w, submitLabel));
|
|
357
417
|
}
|
|
358
418
|
for (const node of trailing)
|
|
359
419
|
form.appendChild(node);
|
|
@@ -388,6 +448,10 @@ function renderForm(w, stepKind) {
|
|
|
388
448
|
if (stepKind === 'collect_second_factor' && w.trustedDeviceEnabled && w.rememberDevice) {
|
|
389
449
|
values.remember_device = 'true';
|
|
390
450
|
}
|
|
451
|
+
if (stepKind === 'enroll_second_factor') {
|
|
452
|
+
void (0, mfa_1.submitEnrollment)(w, values);
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
391
455
|
void (0, flow_1.submit)(w, values);
|
|
392
456
|
});
|
|
393
457
|
return form;
|