@atlasauth/embed 0.1.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.
Files changed (59) hide show
  1. package/dist/appearance.d.ts +293 -0
  2. package/dist/appearance.js +206 -0
  3. package/dist/appearance.js.map +1 -0
  4. package/dist/client.d.ts +12 -0
  5. package/dist/client.js +49 -0
  6. package/dist/client.js.map +1 -0
  7. package/dist/config.d.ts +27 -0
  8. package/dist/config.js +61 -0
  9. package/dist/config.js.map +1 -0
  10. package/dist/element.d.ts +23 -0
  11. package/dist/element.js +51 -0
  12. package/dist/element.js.map +1 -0
  13. package/dist/embed.js +361 -0
  14. package/dist/icons.d.ts +17 -0
  15. package/dist/icons.js +53 -0
  16. package/dist/icons.js.map +1 -0
  17. package/dist/index.d.ts +19 -0
  18. package/dist/index.js +39 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/mount.d.ts +7 -0
  21. package/dist/mount.js +33 -0
  22. package/dist/mount.js.map +1 -0
  23. package/dist/redirect.d.ts +17 -0
  24. package/dist/redirect.js +51 -0
  25. package/dist/redirect.js.map +1 -0
  26. package/dist/standalone.d.ts +25 -0
  27. package/dist/standalone.js +34 -0
  28. package/dist/standalone.js.map +1 -0
  29. package/dist/styles.d.ts +17 -0
  30. package/dist/styles.js +389 -0
  31. package/dist/styles.js.map +1 -0
  32. package/dist/widget/captcha.d.ts +21 -0
  33. package/dist/widget/captcha.js +197 -0
  34. package/dist/widget/captcha.js.map +1 -0
  35. package/dist/widget/constants.d.ts +16 -0
  36. package/dist/widget/constants.js +14 -0
  37. package/dist/widget/constants.js.map +1 -0
  38. package/dist/widget/dom.d.ts +18 -0
  39. package/dist/widget/dom.js +71 -0
  40. package/dist/widget/dom.js.map +1 -0
  41. package/dist/widget/flow.d.ts +41 -0
  42. package/dist/widget/flow.js +424 -0
  43. package/dist/widget/flow.js.map +1 -0
  44. package/dist/widget/forms.d.ts +35 -0
  45. package/dist/widget/forms.js +499 -0
  46. package/dist/widget/forms.js.map +1 -0
  47. package/dist/widget/passkey.d.ts +18 -0
  48. package/dist/widget/passkey.js +88 -0
  49. package/dist/widget/passkey.js.map +1 -0
  50. package/dist/widget/render.d.ts +21 -0
  51. package/dist/widget/render.js +210 -0
  52. package/dist/widget/render.js.map +1 -0
  53. package/dist/widget/social.d.ts +44 -0
  54. package/dist/widget/social.js +331 -0
  55. package/dist/widget/social.js.map +1 -0
  56. package/dist/widget.d.ts +124 -0
  57. package/dist/widget.js +182 -0
  58. package/dist/widget.js.map +1 -0
  59. package/package.json +27 -0
@@ -0,0 +1,124 @@
1
+ import { BehaviorRecorder, type FapiClient, type FlowState, type ResetFlowState } from '@atlasauth/js';
2
+ import { type CodeInputStyle, type CaptchaFlowKey, type FlowCaptcha, type PublicAppearance, type PublicSignUpField, type ResolvedSocialButtons, type ResolvedInteraction, type WidgetAppearance } from './appearance';
3
+ /**
4
+ * The framework-agnostic sign-in panel.
5
+ *
6
+ * It renders in the HOST DOM — never an iframe — for the same reasons the React
7
+ * SDK does (§10.3): password managers, autofill and the tenant's own CSS all
8
+ * need real, same-document markup. It drives the SAME FAPI endpoints as the
9
+ * React `<SignIn/>` and the hosted page, through the shared `@atlasauth/js` flow
10
+ * driver, so the three surfaces cannot diverge in what the server sees.
11
+ */
12
+ export interface WidgetOptions {
13
+ /** Publishable key (`pk_…`) identifying the instance. */
14
+ publishableKey: string;
15
+ /** The instance's FAPI origin the widget calls cross-origin. */
16
+ frontendApi: string;
17
+ mode?: 'sign-in' | 'sign-up';
18
+ /** Where to go on success. Validated: same-origin or an absolute https URL. */
19
+ redirect?: string;
20
+ /**
21
+ * Preview mode: run the whole sign-in flow (every provider and factor) but
22
+ * NEVER exchange the ticket for a session cookie, so a "test your login"
23
+ * preview embedded in another app cannot clobber that app's own session. The
24
+ * `atlas:complete` event still fires; no redirect happens.
25
+ */
26
+ preview?: boolean;
27
+ /** Inline appearance override, merged over the tenant's public appearance. */
28
+ appearance?: WidgetAppearance;
29
+ /** Injected in tests; defaults to the global fetch. */
30
+ fetchImpl?: typeof fetch;
31
+ }
32
+ export declare class AtlasWidget {
33
+ readonly root: HTMLElement;
34
+ readonly options: WidgetOptions;
35
+ readonly client: FapiClient;
36
+ readonly mode: 'sign-in' | 'sign-up';
37
+ appearance: PublicAppearance | null;
38
+ providers: string[];
39
+ /** Providers that render the official native button (Google GSI), by client_id. */
40
+ nativeProviders: {
41
+ provider: string;
42
+ client_id: string;
43
+ }[];
44
+ /** "Sign in with Atlas" state — the preset OIDC connection, when enabled. */
45
+ signInWithAtlas: {
46
+ enabled: boolean;
47
+ connection_id?: string;
48
+ };
49
+ /** How the social buttons are drawn — resolved from tenant default + inline override. */
50
+ social: ResolvedSocialButtons;
51
+ /** How a verification code is entered — segmented `boxes` (default) or `single`. */
52
+ codeInputStyle: CodeInputStyle;
53
+ /** How controls feel — button style/effect, shadow, density, input style, motion. */
54
+ interaction: ResolvedInteraction;
55
+ /**
56
+ * §5.3 second-factor fallback: when the user chose "use a backup code", the 2FA
57
+ * step renders a single free-text field (recovery codes are alphanumeric and
58
+ * variable-length, so they can't go in fixed digit boxes) instead of the OTP
59
+ * boxes. Reset whenever a fresh flow starts.
60
+ */
61
+ backupCodeMode: boolean;
62
+ /**
63
+ * The email/username the user typed at the identifier step, kept so later steps
64
+ * can show it as context ("Enter the code we sent to you@example.com") — the
65
+ * server's attempt view does not echo it back.
66
+ */
67
+ enteredIdentifier: string | null;
68
+ /** The step shown on the previous render — so the spawn animation plays only on a real step change. */
69
+ lastStepKind: string | null;
70
+ /** §5 the tenant's configured extra sign-up fields (name, company, custom…). */
71
+ signUpFields: PublicSignUpField[];
72
+ /** Whether password is an enabled first factor — drives single-screen sign-in. */
73
+ passwordEnabled: boolean;
74
+ /** §5.5 whether the instance offers passkeys — gates the "Sign in with a passkey" button. */
75
+ passkeyEnabled: boolean;
76
+ /** §5.5 aborts the background conditional-UI passkey ceremony when the user acts otherwise. */
77
+ conditionalAbort?: AbortController;
78
+ /** §7.5 whether the instance offers a "Remember me" checkbox at sign-in. */
79
+ rememberMeEnabled: boolean;
80
+ /** The current Remember-me choice — ticked by default (persistent session). */
81
+ remember: boolean;
82
+ /** §5.3 whether the instance offers a "Remember this device" checkbox at 2FA. */
83
+ trustedDeviceEnabled: boolean;
84
+ /** The current Remember-this-device choice — UNticked by default (opt-in). */
85
+ rememberDevice: boolean;
86
+ /**
87
+ * §5 per-flow captcha the server asks this widget to render, keyed by flow.
88
+ * Empty when the instance has no captcha configured. A flow with a renderable
89
+ * provider draws its challenge and attaches the token to that flow's request.
90
+ */
91
+ captchaFlows: Partial<Record<CaptchaFlowKey, FlowCaptcha>>;
92
+ /** Lazily-created host element the captcha widget renders into. */
93
+ captchaHost?: HTMLElement;
94
+ state: FlowState;
95
+ /**
96
+ * §5.4 "Forgot password" sub-flow. Null when signing in normally; set to a reset
97
+ * flow state when the user starts a reset (email → code → new password → signed
98
+ * in), which takes over the panel until it completes or the user goes back.
99
+ */
100
+ resetFlow: ResetFlowState | null;
101
+ /**
102
+ * A one-time confirmation shown above the sign-in box — e.g. after a
103
+ * force-login password reset ("Password updated. Sign in with your new
104
+ * password."). Cleared on the next submit.
105
+ */
106
+ flash: string | null;
107
+ /** Set to a provider key when a handle-first provider (Bluesky) is awaiting the
108
+ * user's handle before the redirect; drives the handle-prompt sub-screen. */
109
+ handlePrompt: string | null;
110
+ busy: boolean;
111
+ /** §bot — passive behavioural recorder started at mount (best-effort). */
112
+ recorder?: BehaviorRecorder;
113
+ constructor(root: HTMLElement, options: WidgetOptions);
114
+ /** Boot: handle any redirect landing, fetch appearance, then render. */
115
+ mount(): Promise<void>;
116
+ private applyTheme;
117
+ /**
118
+ * Reflect the resolved interaction config onto the root as data-attributes (the
119
+ * stylesheet keys off them) plus the motion-tempo variable. Turning animations
120
+ * off zeroes the tempo so transitions are instant; the stylesheet's
121
+ * prefers-reduced-motion block still forces 0s on top of this.
122
+ */
123
+ private applyInteraction;
124
+ }
package/dist/widget.js ADDED
@@ -0,0 +1,182 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AtlasWidget = void 0;
4
+ const js_1 = require("@atlasauth/js");
5
+ const appearance_1 = require("./appearance");
6
+ const client_1 = require("./client");
7
+ const styles_1 = require("./styles");
8
+ const render_1 = require("./widget/render");
9
+ const flow_1 = require("./widget/flow");
10
+ const passkey_1 = require("./widget/passkey");
11
+ class AtlasWidget {
12
+ root;
13
+ options;
14
+ client;
15
+ mode;
16
+ appearance = null;
17
+ providers = [];
18
+ /** Providers that render the official native button (Google GSI), by client_id. */
19
+ nativeProviders = [];
20
+ /** "Sign in with Atlas" state — the preset OIDC connection, when enabled. */
21
+ signInWithAtlas = { enabled: false };
22
+ /** How the social buttons are drawn — resolved from tenant default + inline override. */
23
+ social = (0, appearance_1.resolveSocialButtons)(undefined, undefined);
24
+ /** How a verification code is entered — segmented `boxes` (default) or `single`. */
25
+ codeInputStyle = 'boxes';
26
+ /** How controls feel — button style/effect, shadow, density, input style, motion. */
27
+ interaction = (0, appearance_1.resolveInteraction)(undefined, undefined);
28
+ /**
29
+ * §5.3 second-factor fallback: when the user chose "use a backup code", the 2FA
30
+ * step renders a single free-text field (recovery codes are alphanumeric and
31
+ * variable-length, so they can't go in fixed digit boxes) instead of the OTP
32
+ * boxes. Reset whenever a fresh flow starts.
33
+ */
34
+ backupCodeMode = false;
35
+ /**
36
+ * The email/username the user typed at the identifier step, kept so later steps
37
+ * can show it as context ("Enter the code we sent to you@example.com") — the
38
+ * server's attempt view does not echo it back.
39
+ */
40
+ enteredIdentifier = null;
41
+ /** The step shown on the previous render — so the spawn animation plays only on a real step change. */
42
+ lastStepKind = null;
43
+ /** §5 the tenant's configured extra sign-up fields (name, company, custom…). */
44
+ signUpFields = [];
45
+ /** Whether password is an enabled first factor — drives single-screen sign-in. */
46
+ passwordEnabled = true;
47
+ /** §5.5 whether the instance offers passkeys — gates the "Sign in with a passkey" button. */
48
+ passkeyEnabled = false;
49
+ /** §5.5 aborts the background conditional-UI passkey ceremony when the user acts otherwise. */
50
+ conditionalAbort;
51
+ /** §7.5 whether the instance offers a "Remember me" checkbox at sign-in. */
52
+ rememberMeEnabled = false;
53
+ /** The current Remember-me choice — ticked by default (persistent session). */
54
+ remember = true;
55
+ /** §5.3 whether the instance offers a "Remember this device" checkbox at 2FA. */
56
+ trustedDeviceEnabled = false;
57
+ /** The current Remember-this-device choice — UNticked by default (opt-in). */
58
+ rememberDevice = false;
59
+ /**
60
+ * §5 per-flow captcha the server asks this widget to render, keyed by flow.
61
+ * Empty when the instance has no captcha configured. A flow with a renderable
62
+ * provider draws its challenge and attaches the token to that flow's request.
63
+ */
64
+ captchaFlows = {};
65
+ /** Lazily-created host element the captcha widget renders into. */
66
+ captchaHost;
67
+ state = js_1.initialFlow;
68
+ /**
69
+ * §5.4 "Forgot password" sub-flow. Null when signing in normally; set to a reset
70
+ * flow state when the user starts a reset (email → code → new password → signed
71
+ * in), which takes over the panel until it completes or the user goes back.
72
+ */
73
+ resetFlow = null;
74
+ /**
75
+ * A one-time confirmation shown above the sign-in box — e.g. after a
76
+ * force-login password reset ("Password updated. Sign in with your new
77
+ * password."). Cleared on the next submit.
78
+ */
79
+ flash = null;
80
+ /** Set to a provider key when a handle-first provider (Bluesky) is awaiting the
81
+ * user's handle before the redirect; drives the handle-prompt sub-screen. */
82
+ handlePrompt = null;
83
+ busy = false;
84
+ /** §bot — passive behavioural recorder started at mount (best-effort). */
85
+ recorder;
86
+ constructor(root, options) {
87
+ this.root = root;
88
+ this.options = options;
89
+ this.mode = options.mode ?? 'sign-in';
90
+ // Resolve the interaction config from the inline override up front so the very
91
+ // first loading paint (before /v1/appearance resolves) already honours an
92
+ // inline `loading` style; the tenant's server config is layered in at mount.
93
+ this.interaction = (0, appearance_1.resolveInteraction)(undefined, options.appearance?.interaction);
94
+ this.client = (0, client_1.createClient)({
95
+ publishableKey: options.publishableKey,
96
+ frontendApi: options.frontendApi,
97
+ fetchImpl: options.fetchImpl,
98
+ });
99
+ }
100
+ /** Boot: handle any redirect landing, fetch appearance, then render. */
101
+ async mount() {
102
+ (0, styles_1.injectStyles)(this.root.ownerDocument ?? document);
103
+ this.root.classList.add('atlas-embed-root');
104
+ this.applyTheme();
105
+ this.applyInteraction();
106
+ (0, render_1.renderLoading)(this);
107
+ // A completed sign-in (OAuth/hosted handoff) redirected back to this page:
108
+ // exchange the one-time ticket for cookies, scrub the URL, and finish.
109
+ const handled = await (0, flow_1.handleRedirectLanding)(this);
110
+ if (handled)
111
+ return;
112
+ const data = await (0, client_1.fetchAppearance)(this.client);
113
+ if (data) {
114
+ this.appearance = data.appearance;
115
+ // §6.5 keep only providers scoped to THIS screen. A provider with no
116
+ // scope entry is unscoped (shows on both). The resolver enforces the
117
+ // same, so a hidden provider could never have completed here anyway.
118
+ const scopes = data.provider_scopes ?? {};
119
+ const allowedForMode = (id) => {
120
+ const s = scopes[id];
121
+ if (!s)
122
+ return true;
123
+ return this.mode === 'sign-up' ? s.sign_up : s.sign_in;
124
+ };
125
+ this.providers = (0, appearance_1.orderedProviders)(data.providers ?? [], data.appearance).filter(allowedForMode);
126
+ this.nativeProviders = (data.native_providers ?? []).filter((n) => allowedForMode(n.provider));
127
+ // Whether to show the password field on the identifier screen (single-screen
128
+ // sign-in). Default true when we can't tell — password is the common case.
129
+ this.passwordEnabled = data.strategies?.password ?? true;
130
+ this.passkeyEnabled = data.strategies?.passkey ?? false;
131
+ this.signInWithAtlas = data.sign_in_with_atlas ?? { enabled: false };
132
+ this.rememberMeEnabled = data.rememberMe === true;
133
+ this.trustedDeviceEnabled = data.rememberDevice === true;
134
+ this.captchaFlows = data.captchaFlows ?? {};
135
+ this.applyTheme();
136
+ }
137
+ // Social-button look: tenant server default (if any) overlaid by the inline
138
+ // appearance override the embedding page passed.
139
+ this.social = (0, appearance_1.resolveSocialButtons)(this.appearance?.socialButtons, this.options.appearance?.socialButtons);
140
+ this.codeInputStyle = (0, appearance_1.resolveCodeInput)(this.appearance?.codeInput, this.options.appearance?.codeInput);
141
+ this.interaction = (0, appearance_1.resolveInteraction)(this.appearance?.interaction, this.options.appearance?.interaction);
142
+ this.applyInteraction();
143
+ this.signUpFields = this.appearance?.signUpFields ?? [];
144
+ // §bot — begin passive behavioural collection once the form is up. Never
145
+ // throws; captures timings/counts only, no field content.
146
+ try {
147
+ this.recorder = new js_1.BehaviorRecorder(this.root.ownerDocument ?? document);
148
+ }
149
+ catch {
150
+ /* telemetry is best-effort */
151
+ }
152
+ (0, render_1.render)(this);
153
+ // §5.5 passkey autofill (conditional UI): once the sign-in form is up, quietly
154
+ // arm a discoverable-credential ceremony so the browser can offer saved
155
+ // passkeys in the email field. Best-effort and abortable — never blocks.
156
+ void (0, passkey_1.startConditionalPasskey)(this);
157
+ }
158
+ applyTheme() {
159
+ const tokens = (0, appearance_1.resolveTokens)(this.appearance, this.options.appearance);
160
+ const vars = (0, appearance_1.cssVariables)(tokens);
161
+ for (const [key, value] of Object.entries(vars))
162
+ this.root.style.setProperty(key, value);
163
+ }
164
+ /**
165
+ * Reflect the resolved interaction config onto the root as data-attributes (the
166
+ * stylesheet keys off them) plus the motion-tempo variable. Turning animations
167
+ * off zeroes the tempo so transitions are instant; the stylesheet's
168
+ * prefers-reduced-motion block still forces 0s on top of this.
169
+ */
170
+ applyInteraction() {
171
+ const i = this.interaction;
172
+ this.root.setAttribute('data-button-style', i.buttonStyle);
173
+ this.root.setAttribute('data-button-effect', i.buttonEffect);
174
+ this.root.setAttribute('data-shadow', i.shadow);
175
+ this.root.setAttribute('data-density', i.density);
176
+ this.root.setAttribute('data-input-style', i.inputStyle);
177
+ const ms = i.animations ? appearance_1.MOTION_MS[i.motionSpeed] : 0;
178
+ this.root.style.setProperty('--atlas-embed-motion', `${ms}ms`);
179
+ }
180
+ }
181
+ exports.AtlasWidget = AtlasWidget;
182
+ //# sourceMappingURL=widget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget.js","sourceRoot":"","sources":["../src/widget.ts"],"names":[],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C,OAAO,CAAC,IAAI,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC3F,CAAC;IAED;;;;;OAKG;IACK,gBAAgB;QACtB,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;QAC3B,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,mBAAmB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC;QAC3D,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,oBAAoB,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC;QAC7D,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;QAChD,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC;QACzD,MAAM,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,sBAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,sBAAsB,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IACjE,CAAC;CACF;AArLD,kCAqLC"}
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@atlasauth/embed",
3
+ "version": "0.1.0",
4
+ "main": "./dist/index.js",
5
+ "types": "./dist/index.d.ts",
6
+ "dependencies": {
7
+ "@atlasauth/js": "0.1.0"
8
+ },
9
+ "devDependencies": {
10
+ "esbuild": "^0.21.5",
11
+ "happy-dom": "^15.11.0",
12
+ "typescript": "^5.6.3",
13
+ "vitest": "^2.1.4"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "README.md"
21
+ ],
22
+ "scripts": {
23
+ "build": "tsc -p tsconfig.build.json && node build.mjs",
24
+ "typecheck": "tsc -p tsconfig.json --noEmit",
25
+ "test": "vitest run"
26
+ }
27
+ }