@unisim/sdk 0.140.3 → 0.141.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -65,6 +65,28 @@ function Header() {
65
65
  `trial-collision` escape hatch: drop the anonymous session and sign in for
66
66
  real, leaving the trial work behind. Only after the user has agreed to that.
67
67
  - `<SignInDialog />` renders all of the above; apps rarely need the functions.
68
+ **Two tabs, like Universal Family:** *Email code* (type your email, get a
69
+ 6-digit code; the same code signs in, creates the account, or upgrades a
70
+ trial in place) and *Apple / Google / Microsoft*. An email typed on the first
71
+ travels to the second as a `login_hint` (Google and Microsoft pre-fill it;
72
+ Apple has no such parameter). A password is a quiet second route on the code
73
+ tab: it signs an existing account in and never creates one, and there is no
74
+ password reset — the code is the way back in. The provider tab appears **only
75
+ for providers the Supabase project has switched on**, and **never in a native
76
+ (Capacitor) shell**; without it there is no tab bar at all. See the header of
77
+ `SignInDialog.tsx`.
78
+ - `sendSignInCode(supabase, { email })` / `verifySignInCode(supabase, { email,
79
+ code, flow })` — the code tab's logic, for other sign-in screens (the hub's).
80
+ A trial session gets an email-change code, verified as `email_change`, so the
81
+ user id survives; an address that already has an account quietly becomes an
82
+ ordinary code, so the form discloses nothing. Offline, the code is `123456`.
83
+ - `startOAuthSignIn(supabase, provider, { redirectTo, loginHint })` — Apple,
84
+ Google (`google`) or Microsoft (`azure`). A trial session is upgraded in place
85
+ with `linkIdentity`, never replaced.
86
+ - `fetchEnabledOAuthProviders(supabaseUrl, anonKey)` — which providers are on,
87
+ from `/auth/v1/settings`; `[]` on any doubt.
88
+ - `<OAuthButtons providers={…} />` — the buttons. Without `providers` it shows
89
+ Google and Microsoft only, because the hub's labels predate Apple.
68
90
 
69
91
  ### Trial mode (anonymous-auth users)
70
92
  - `useTrialMode()` — `{ isTrial, hasSession, email }` for gating exports / multi-user
@@ -3,6 +3,12 @@ import { type OAuthProvider } from './oauth.js';
3
3
  export interface OAuthButtonsProps {
4
4
  /** Called with the chosen provider. The caller starts the redirect. */
5
5
  onProvider: (provider: OAuthProvider) => void;
6
+ /**
7
+ * Which buttons to show, in order. Defaults to Google and Microsoft (see
8
+ * LEGACY_PROVIDERS). `fetchEnabledOAuthProviders` gives the list the
9
+ * project actually has switched on.
10
+ */
11
+ providers?: readonly OAuthProvider[];
6
12
  /** The provider whose redirect is in flight, if any — that button shows busy. */
7
13
  busyProvider?: OAuthProvider | null;
8
14
  /** Disable the whole row (e.g. while a password submit is running). */
@@ -17,5 +23,9 @@ export interface OAuthButtonsProps {
17
23
  /** Optional note under the buttons (e.g. the anonymous-trial reassurance). */
18
24
  note?: ReactNode;
19
25
  }
20
- export declare function OAuthButtons({ onProvider, busyProvider, disabled, labelFor, dividerLabel, note, }: OAuthButtonsProps): import("react/jsx-runtime").JSX.Element;
26
+ export declare function OAuthButtons({ onProvider, providers, busyProvider, disabled, labelFor, dividerLabel, note, }: OAuthButtonsProps): import("react/jsx-runtime").JSX.Element;
27
+ /** One provider's mark, 18px. Also used by <SignInDialog />'s "Use …" link. */
28
+ export declare function ProviderMark({ provider }: {
29
+ provider: OAuthProvider;
30
+ }): import("react/jsx-runtime").JSX.Element;
21
31
  //# sourceMappingURL=OAuthButtons.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OAuthButtons.d.ts","sourceRoot":"","sources":["../src/OAuthButtons.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAA;AACrD,OAAO,EAAuC,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AAoBpF,MAAM,WAAW,iBAAiB;IAChC,uEAAuE;IACvE,UAAU,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAA;IAC7C,iFAAiF;IACjF,YAAY,CAAC,EAAE,aAAa,GAAG,IAAI,CAAA;IACnC,uEAAuE;IACvE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,QAAQ,CAAC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
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { OAUTH_PROVIDERS, oauthProviderLabel } from './oauth.js';
4
- export function OAuthButtons({ onProvider, busyProvider = null, disabled = false, labelFor, dividerLabel, note, }) {
5
- return (_jsxs("div", { children: [_jsx("div", { style: stackStyle, children: OAUTH_PROVIDERS.map((provider) => {
3
+ import { oauthProviderLabel } from './oauth.js';
4
+ // ──────────────────────────────────────────────────────────────────────────────
5
+ // "Continue with Apple / Google / Microsoft" — the buttons themselves.
6
+ //
7
+ // Inline styles, not Tailwind, and no dependency on any host stylesheet: the
8
+ // two surfaces that render this are the hub's <AuthScreen /> (a Tailwind app)
9
+ // and the SDK's own <SignInDialog /> (portalled into arbitrary Universal Apps,
10
+ // several of which have no Tailwind at all). One component means the customer
11
+ // sees the same sign-in row wherever they meet it, and the provider marks are
12
+ // drawn once.
13
+ //
14
+ // ⚠️ The marks are the official Google "G", the Microsoft four-square and the
15
+ // Apple logo, drawn as inline SVG in their own colours. All three companies'
16
+ // guidelines require their own mark, unaltered, on a white or very light
17
+ // button (Apple's "white with outline" style is exactly this button) — a
18
+ // recoloured version is a guideline breach, and Google and Apple both check
19
+ // during review. Don't "simplify" them to currentColor.
20
+ // ──────────────────────────────────────────────────────────────────────────────
21
+ /**
22
+ * What a caller that passes no `providers` gets: the two that existed before
23
+ * Apple was added. The hub's <AuthScreen /> labels its buttons with
24
+ * `p === 'google' ? … : <Microsoft>`, so an Apple button appearing there
25
+ * unasked would read "Continue with Microsoft". Opt in by passing `providers`.
26
+ */
27
+ const LEGACY_PROVIDERS = ['google', 'azure'];
28
+ export function OAuthButtons({ onProvider, providers = LEGACY_PROVIDERS, busyProvider = null, disabled = false, labelFor, dividerLabel, note, }) {
29
+ return (_jsxs("div", { children: [_jsx("div", { style: stackStyle, children: providers.map((provider) => {
6
30
  const busy = busyProvider === provider;
7
31
  const off = disabled || busyProvider !== null;
8
- return (_jsxs("button", { type: "button", onClick: () => onProvider(provider), disabled: off, style: { ...buttonStyle, ...(off ? disabledStyle : null) }, children: [_jsx("span", { style: markStyle, "aria-hidden": true, children: provider === 'google' ? _jsx(GoogleMark, {}) : _jsx(MicrosoftMark, {}) }), _jsx("span", { children: busy ? '…' : (labelFor?.(provider) ?? `Continue with ${oauthProviderLabel(provider)}`) })] }, provider));
32
+ return (_jsxs("button", { type: "button", "data-provider": provider, onClick: () => onProvider(provider), disabled: off, style: { ...buttonStyle, ...(off ? disabledStyle : null) }, children: [_jsx("span", { style: markStyle, "aria-hidden": true, children: _jsx(ProviderMark, { provider: provider }) }), _jsx("span", { children: busy ? '…' : (labelFor?.(provider) ?? `Continue with ${oauthProviderLabel(provider)}`) })] }, provider));
9
33
  }) }), note && _jsx("div", { style: noteStyle, children: note }), dividerLabel && (_jsxs("div", { style: dividerStyle, children: [_jsx("span", { style: ruleStyle }), _jsx("span", { style: dividerTextStyle, children: dividerLabel }), _jsx("span", { style: ruleStyle })] }))] }));
10
34
  }
11
35
  // ── Provider marks ────────────────────────────────────────────────────────────
36
+ /** One provider's mark, 18px. Also used by <SignInDialog />'s "Use …" link. */
37
+ export function ProviderMark({ provider }) {
38
+ if (provider === 'apple')
39
+ return _jsx(AppleMark, {});
40
+ if (provider === 'google')
41
+ return _jsx(GoogleMark, {});
42
+ return _jsx(MicrosoftMark, {});
43
+ }
44
+ function AppleMark() {
45
+ // Black on a white button: Apple's "white with outline" style.
46
+ return (_jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", "aria-hidden": true, focusable: "false", children: _jsx("path", { fill: "#000000", d: "M16.37 1.43c0 1.14-.49 2.27-1.18 3.08-.74.9-1.99 1.57-2.99 1.57-.12 0-.23-.02-.3-.03-.01-.06-.04-.22-.04-.39 0-1.15.57-2.27 1.21-2.98.8-.94 2.14-1.64 3.25-1.68.03.13.05.28.05.43zm4.56 15.71c-.03.07-.46 1.58-1.52 3.12-.94 1.34-1.94 2.71-3.43 2.71-1.52 0-1.9-.88-3.63-.88-1.7 0-2.3.91-3.67.91-1.38 0-2.33-1.26-3.43-2.8-1.29-1.82-2.32-4.63-2.32-7.28 0-4.28 2.8-6.55 5.55-6.55 1.45 0 2.68.95 3.6.95.87 0 2.22-1.01 3.9-1.01.61 0 2.89.06 4.37 2.19-.13.09-2.38 1.37-2.38 4.19 0 3.26 2.85 4.42 2.96 4.45z" }) }));
47
+ }
12
48
  function GoogleMark() {
13
49
  return (_jsxs("svg", { width: "18", height: "18", viewBox: "0 0 48 48", "aria-hidden": true, focusable: "false", children: [_jsx("path", { fill: "#4285F4", d: "M45.12 24.5c0-1.56-.14-3.06-.4-4.5H24v8.51h11.84c-.51 2.75-2.06 5.08-4.39 6.64v5.52h7.11c4.16-3.83 6.56-9.47 6.56-16.17z" }), _jsx("path", { fill: "#34A853", d: "M24 46c5.94 0 10.92-1.97 14.56-5.33l-7.11-5.52c-1.97 1.32-4.49 2.1-7.45 2.1-5.73 0-10.58-3.87-12.31-9.07H4.34v5.7C7.96 41.07 15.4 46 24 46z" }), _jsx("path", { fill: "#FBBC05", d: "M11.69 28.18C11.25 26.86 11 25.45 11 24s.25-2.86.69-4.18v-5.7H4.34C2.85 17.09 2 20.45 2 24s.85 6.91 2.34 9.88l7.35-5.7z" }), _jsx("path", { fill: "#EA4335", d: "M24 10.75c3.23 0 6.13 1.11 8.41 3.29l6.31-6.31C34.91 4.18 29.93 2 24 2 15.4 2 7.96 6.93 4.34 14.12l7.35 5.7c1.73-5.2 6.58-9.07 12.31-9.07z" })] }));
14
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"OAuthButtons.js","sourceRoot":"","sources":["../src/OAuthButtons.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAGZ,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAsB,MAAM,YAAY,CAAA;AAsCpF,MAAM,UAAU,YAAY,CAAC,EAC3B,UAAU,EACV,YAAY,GAAG,IAAI,EACnB,QAAQ,GAAG,KAAK,EAChB,QAAQ,EACR,YAA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ACjB,SAAS,EAAE,YAAY;CACxB,CAAA;AAED,MAAM,aAAa,GAAkB;IACnC,OAAO,EAAE,GAAG;IACZ,MAAM,EAAE,SAAS;CAClB,CAAA;AAED,MAAM,SAAS,GAAkB;IAC/B,OAAO,EAAE,aAAa;IACtB,UAAU,EAAE,QAAQ;IACpB,cAAc,EAAE,QAAQ;IACxB,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;IACV,UAAU,EAAE,CAAC;CACd,CAAA;AAED,MAAM,SAAS,GAAkB;IAC/B,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE,GAAG;IACf,KAAK,EAAE,SAAS;CACjB,CAAA;AAED,MAAM,YAAY,GAAkB;IAClC,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,QAAQ;IACpB,GAAG,EAAE,EAAE;IACP,MAAM,EAAE,YAAY;CACrB,CAAA;AAED,MAAM,SAAS,GAAkB;IAC/B,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,UAAU,EAAE,SAAS;CACtB,CAAA;AAED,MAAM,gBAAgB,GAAkB;IACtC,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE,GAAG;IACf,aAAa,EAAE,QAAQ;IACvB,aAAa,EAAE,WAAW;IAC1B,KAAK,EAAE,SAAS;CACjB,CAAA"}
@@ -1,8 +1,10 @@
1
1
  /**
2
- * Retained for callers pinned to older SDKs. `'signin'` and `'signup'` are now
3
- * the same thing — the unified form — and only `'reset'` opens a different one.
2
+ * Which tab to open on. `'sso'` opens the provider tab (when there is one);
3
+ * everything else opens the email-code tab. `'signup'` and `'reset'` are kept
4
+ * for callers pinned to older SDKs — there is no separate sign-up form, and no
5
+ * password reset: the emailed code is how anybody gets back in.
4
6
  */
5
- export type SignInDialogMode = 'signin' | 'signup' | 'reset';
7
+ export type SignInDialogMode = 'signin' | 'signup' | 'reset' | 'sso';
6
8
  export interface SignInDialogProps {
7
9
  /** Whether the dialog is shown. */
8
10
  open: boolean;
@@ -10,15 +12,10 @@ export interface SignInDialogProps {
10
12
  onClose: () => void;
11
13
  /**
12
14
  * The hub login URL (same value as UniversalAppsNavBar's `hubLoginHref`).
13
- * Only its origin is used: password-reset emails land on
14
- * `<origin>/login?finish=1` (the hub's existing set-a-password step) and
15
- * the footer "manage your account" link points at the origin.
15
+ * Only its origin is used, for the footer's "manage your account" link.
16
16
  */
17
17
  hubLoginHref?: string;
18
- /**
19
- * Which form to open on. Only `'reset'` changes anything now: `'signin'` and
20
- * `'signup'` both open the one unified email + password form.
21
- */
18
+ /** Which tab to open on — see SignInDialogMode. */
22
19
  initialMode?: SignInDialogMode;
23
20
  }
24
21
  export declare function SignInDialog({ open, onClose, hubLoginHref, initialMode, }: SignInDialogProps): import("react").ReactPortal | null;
@@ -1 +1 @@
1
- {"version":3,"file":"SignInDialog.d.ts","sourceRoot":"","sources":["../src/SignInDialog.tsx"],"names":[],"mappings":"AAqDA;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE5D,MAAM,WAAW,iBAAiB;IAChC,mCAAmC;IACnC,IAAI,EAAE,OAAO,CAAA;IACb,qFAAqF;IACrF,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAA;CAC/B;AAgBD,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,WAAsB,GACvB,EAAE,iBAAiB,sCA6UnB"}
1
+ {"version":3,"file":"SignInDialog.d.ts","sourceRoot":"","sources":["../src/SignInDialog.tsx"],"names":[],"mappings":"AAuEA;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAA;AAEpE,MAAM,WAAW,iBAAiB;IAChC,mCAAmC;IACnC,IAAI,EAAE,OAAO,CAAA;IACb,qFAAqF;IACrF,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,mDAAmD;IACnD,WAAW,CAAC,EAAE,gBAAgB,CAAA;CAC/B;AA2BD,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,WAAsB,GACvB,EAAE,iBAAiB,sCA8bnB"}