@oxy.so/services 6.1.0 → 6.2.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/lib/commonjs/ui/components/OxyAuthChooser.js +7 -6
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/SurfaceScreen.js +21 -12
- package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -1
- package/lib/commonjs/ui/components/signIn/OxyAuthScreen.js +11 -5
- package/lib/commonjs/ui/components/signIn/OxyAuthScreen.js.map +1 -1
- package/lib/commonjs/ui/components/signIn/OxySignInPanel.js +45 -32
- package/lib/commonjs/ui/components/signIn/OxySignInPanel.js.map +1 -1
- package/lib/commonjs/ui/components/signIn/signInMethods.js +19 -18
- package/lib/commonjs/ui/components/signIn/signInMethods.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +4 -4
- package/lib/commonjs/ui/hooks/useSurfaceFrameWidth.js +28 -0
- package/lib/commonjs/ui/hooks/useSurfaceFrameWidth.js.map +1 -0
- package/lib/module/ui/components/OxyAuthChooser.js +7 -6
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/SurfaceScreen.js +21 -12
- package/lib/module/ui/components/SurfaceScreen.js.map +1 -1
- package/lib/module/ui/components/signIn/OxyAuthScreen.js +11 -5
- package/lib/module/ui/components/signIn/OxyAuthScreen.js.map +1 -1
- package/lib/module/ui/components/signIn/OxySignInPanel.js +47 -32
- package/lib/module/ui/components/signIn/OxySignInPanel.js.map +1 -1
- package/lib/module/ui/components/signIn/signInMethods.js +19 -18
- package/lib/module/ui/components/signIn/signInMethods.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +4 -4
- package/lib/module/ui/hooks/useSurfaceFrameWidth.js +24 -0
- package/lib/module/ui/hooks/useSurfaceFrameWidth.js.map +1 -0
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +3 -2
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/OxyAuthScreen.d.ts +7 -1
- package/lib/typescript/commonjs/ui/components/signIn/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts +12 -12
- package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/signInMethods.d.ts +18 -15
- package/lib/typescript/commonjs/ui/components/signIn/signInMethods.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +4 -4
- package/lib/typescript/commonjs/ui/hooks/useSurfaceFrameWidth.d.ts +12 -0
- package/lib/typescript/commonjs/ui/hooks/useSurfaceFrameWidth.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +3 -2
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/signIn/OxyAuthScreen.d.ts +7 -1
- package/lib/typescript/module/ui/components/signIn/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts +12 -12
- package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/signIn/signInMethods.d.ts +18 -15
- package/lib/typescript/module/ui/components/signIn/signInMethods.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +4 -4
- package/lib/typescript/module/ui/hooks/useSurfaceFrameWidth.d.ts +12 -0
- package/lib/typescript/module/ui/hooks/useSurfaceFrameWidth.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/ui/components/OxyAuthChooser.tsx +7 -6
- package/src/ui/components/SurfaceScreen.tsx +19 -11
- package/src/ui/components/signIn/OxyAuthScreen.tsx +14 -5
- package/src/ui/components/signIn/OxySignInPanel.tsx +56 -37
- package/src/ui/components/signIn/signInMethods.ts +21 -17
- package/src/ui/context/OxyContext.tsx +4 -4
- package/src/ui/context/oxyContextTypes.ts +4 -4
- package/src/ui/hooks/useSurfaceFrameWidth.ts +21 -0
|
@@ -3,40 +3,41 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Which sign-in methods a surface offers, from where it runs.
|
|
5
5
|
*
|
|
6
|
-
* One screen everywhere
|
|
6
|
+
* One screen everywhere, and sign-in happens IN it (ADR 0029 D1):
|
|
7
7
|
*
|
|
8
|
-
* -
|
|
9
|
-
*
|
|
10
|
-
* the
|
|
11
|
-
* on
|
|
12
|
-
* -
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* device that has no Commons to continue with.
|
|
8
|
+
* - the COMMONS way in — on the web the embedded QR (the split card's right
|
|
9
|
+
* column from `md`, with "Continue with Oxy" below `md`, where the screen
|
|
10
|
+
* is the phone that would scan it); on native "Continue with Oxy", and
|
|
11
|
+
* "Get Commons" on a device that has no Commons to continue with;
|
|
12
|
+
* - the PASSKEY — it belongs to `oxy.so`, so it runs right here on auth.oxy.so
|
|
13
|
+
* (`page`: the username with its Continue, and the discoverable passkey), and
|
|
14
|
+
* in an app's dialog on the web it opens auth.oxy.so's window for that one
|
|
15
|
+
* step (with account creation); native has none, Commons holds the identity.
|
|
17
16
|
*/
|
|
18
17
|
|
|
19
18
|
/**
|
|
20
|
-
* `qr` —
|
|
21
|
-
* `window` — an app on the web: "Continue with Oxy" opens auth.oxy.so's window.
|
|
19
|
+
* `qr` — the web: the embedded QR from `md`, "Continue with Oxy" below.
|
|
22
20
|
* `continue` — native "Continue with Oxy": Oxy picks the route (shared
|
|
23
21
|
* keychain, Commons on this device, a push, or the QR view).
|
|
24
22
|
* `get-commons` — native, and Commons is not installed here.
|
|
25
23
|
*/
|
|
26
24
|
|
|
25
|
+
/**
|
|
26
|
+
* `here` — auth.oxy.so: the username and the passkey run on this page.
|
|
27
|
+
* `window` — an app's dialog on the web: the passkey opens auth.oxy.so's window.
|
|
28
|
+
* `none` — native.
|
|
29
|
+
*/
|
|
30
|
+
|
|
27
31
|
export function resolveSignInMethods(facts) {
|
|
28
32
|
if (facts.web) {
|
|
29
|
-
return
|
|
33
|
+
return {
|
|
30
34
|
commons: 'qr',
|
|
31
|
-
passkey:
|
|
32
|
-
} : {
|
|
33
|
-
commons: 'window',
|
|
34
|
-
passkey: false
|
|
35
|
+
passkey: facts.host === 'page' ? 'here' : 'window'
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
return {
|
|
38
39
|
commons: facts.commonsAvailability === 'unavailable' ? 'get-commons' : 'continue',
|
|
39
|
-
passkey:
|
|
40
|
+
passkey: 'none'
|
|
40
41
|
};
|
|
41
42
|
}
|
|
42
43
|
//# sourceMappingURL=signInMethods.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["resolveSignInMethods","facts","web","
|
|
1
|
+
{"version":3,"names":["resolveSignInMethods","facts","web","commons","passkey","host","commonsAvailability"],"sourceRoot":"../../../../../src","sources":["ui/components/signIn/signInMethods.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAiBA,OAAO,SAASA,oBAAoBA,CAACC,KAAyB,EAAiB;EAC7E,IAAIA,KAAK,CAACC,GAAG,EAAE;IACb,OAAO;MAAEC,OAAO,EAAE,IAAI;MAAEC,OAAO,EAAEH,KAAK,CAACI,IAAI,KAAK,MAAM,GAAG,MAAM,GAAG;IAAS,CAAC;EAC9E;EACA,OAAO;IACLF,OAAO,EAAEF,KAAK,CAACK,mBAAmB,KAAK,aAAa,GAAG,aAAa,GAAG,UAAU;IACjFF,OAAO,EAAE;EACX,CAAC;AACH","ignoreList":[]}
|
|
@@ -668,10 +668,10 @@ export const OxyRuntimeProvider = ({
|
|
|
668
668
|
})
|
|
669
669
|
}, options), [webAuthMode, oxyServices, clientId, authorizeBaseUrl, isIdentityBound, user?.id]);
|
|
670
670
|
|
|
671
|
-
//
|
|
672
|
-
//
|
|
673
|
-
//
|
|
674
|
-
//
|
|
671
|
+
// What only auth.oxy.so can do for an Oxy app on the web — assert the
|
|
672
|
+
// `oxy.so` passkey, create or recover a passkey account — runs in its window
|
|
673
|
+
// over the app, for that one step. A blocked window falls back to the same
|
|
674
|
+
// page in this tab.
|
|
675
675
|
const continueOnAuth = useCallback(screen => startWebOAuthSignInForContext({
|
|
676
676
|
redirectUri: authRedirectUri ?? globalThis.location?.origin ?? '',
|
|
677
677
|
transport: 'popup',
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createContext, useContext, useLayoutEffect } from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A screen's say in how wide its surface is.
|
|
7
|
+
*
|
|
8
|
+
* `SurfaceScreen` is the ONE host that declares the surface's dialog frame, so
|
|
9
|
+
* a screen whose views need different widths (the account dialog: the 420 menu,
|
|
10
|
+
* the sign-in's 880 split card) hands its width to that host rather than
|
|
11
|
+
* declaring a second frame. A change morphs the centered card to it.
|
|
12
|
+
*/
|
|
13
|
+
export const SurfaceFrameWidthContext = /*#__PURE__*/createContext(null);
|
|
14
|
+
|
|
15
|
+
/** Ask the surface for `maxWidth` (px) while this is mounted; `null` keeps the surface's own. */
|
|
16
|
+
export function useSurfaceFrameWidth(maxWidth) {
|
|
17
|
+
const setWidth = useContext(SurfaceFrameWidthContext);
|
|
18
|
+
useLayoutEffect(() => {
|
|
19
|
+
if (!setWidth) return;
|
|
20
|
+
setWidth(maxWidth);
|
|
21
|
+
return () => setWidth(null);
|
|
22
|
+
}, [setWidth, maxWidth]);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=useSurfaceFrameWidth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useContext","useLayoutEffect","SurfaceFrameWidthContext","useSurfaceFrameWidth","maxWidth","setWidth"],"sourceRoot":"../../../../src","sources":["ui/hooks/useSurfaceFrameWidth.ts"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,UAAU,EAAEC,eAAe,QAAQ,OAAO;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,wBAAwB,gBAAGH,aAAa,CAA6C,IAAI,CAAC;;AAEvG;AACA,OAAO,SAASI,oBAAoBA,CAACC,QAAuB,EAAQ;EAClE,MAAMC,QAAQ,GAAGL,UAAU,CAACE,wBAAwB,CAAC;EACrDD,eAAe,CAAC,MAAM;IACpB,IAAI,CAACI,QAAQ,EAAE;IACfA,QAAQ,CAACD,QAAQ,CAAC;IAClB,OAAO,MAAMC,QAAQ,CAAC,IAAI,CAAC;EAC7B,CAAC,EAAE,CAACA,QAAQ,EAAED,QAAQ,CAAC,CAAC;AAC1B","ignoreList":[]}
|
|
@@ -16,8 +16,9 @@
|
|
|
16
16
|
*
|
|
17
17
|
* - `accounts` → `AccountsMenuView` — the signed-in Oxy account menu.
|
|
18
18
|
* - `add` / `signin` → `OxySignInPanel` — THE sign-in screen, the one
|
|
19
|
-
* auth.oxy.so renders too: the device's accounts, then
|
|
20
|
-
*
|
|
19
|
+
* auth.oxy.so renders too: the device's accounts, then the Commons way in
|
|
20
|
+
* (the embedded QR, or "Continue with Oxy"), then the passkey (on the web
|
|
21
|
+
* in an app, auth.oxy.so's window for that one step).
|
|
21
22
|
* - `qr` → `SignInRequestView` — the ACTIVE REQUEST: the controller-bound
|
|
22
23
|
* wiring over the shared, presentational `OxySignInRequestSurface` (the same
|
|
23
24
|
* component the auth.oxy.so IdP mounts from its OAuth-bound request). It maps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyAuthChooser.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAuthChooser.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"OxyAuthChooser.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAuthChooser.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoD/B,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED;;;;GAIG;AACH,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwXjD,CAAC;AA8BF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SurfaceScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/SurfaceScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8E,MAAM,OAAO,CAAC;AAUnG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAI9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"SurfaceScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/SurfaceScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8E,MAAM,OAAO,CAAC;AAUnG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAI9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAuFrE,MAAM,WAAW,kBAAkB;IACjC,0DAA0D;IAC1D,QAAQ,EAAE,eAAe,CAAC;IAC1B,iFAAiF;IACjF,OAAO,EAAE,eAAe,CAAC;IACzB,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,iBAAS,aAAa,CAAC,EACrB,QAAQ,EACR,OAAO,EACP,iBAAwB,GACzB,EAAE,kBAAkB,4BAuKpB;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -27,10 +27,16 @@ export declare const OxyAuthScreen: React.FC<{
|
|
|
27
27
|
children: React.ReactNode;
|
|
28
28
|
className?: string;
|
|
29
29
|
}>;
|
|
30
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* The split card: `children` on the left and, from `md`, `aside` on the right.
|
|
32
|
+
* `bare` inside a surface that already is the card (the account dialog): no
|
|
33
|
+
* border of its own, and the right column is a rounded tile within the
|
|
34
|
+
* dialog's margins.
|
|
35
|
+
*/
|
|
31
36
|
export declare const OxyAuthSplit: React.FC<{
|
|
32
37
|
children: React.ReactNode;
|
|
33
38
|
aside: React.ReactNode;
|
|
39
|
+
bare?: boolean;
|
|
34
40
|
}>;
|
|
35
41
|
/**
|
|
36
42
|
* The screen while there is nothing to show yet. React Native's own indicator:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyAuthScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxyAuthScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAqBlE,CAAC;AAEF,wGAAwG;AACxG,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAErF,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"OxyAuthScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxyAuthScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAqBlE,CAAC;AAEF,wGAAwG;AACxG,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAErF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,CAuBxG,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAOlC,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAiBhC,CAAC"}
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
* differs (`host`).
|
|
5
5
|
*
|
|
6
6
|
* picker a returning device: "Choose an account", then "Use another account"
|
|
7
|
-
* entry the header, the Commons way in, and the way in for
|
|
8
|
-
* account. On
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
7
|
+
* entry the header, the Commons way in, the passkey, and the way in for
|
|
8
|
+
* someone with no account. On the web, from `md`, the screen is
|
|
9
|
+
* Bloom `AuthCard`'s split card and the Commons way in is the
|
|
10
|
+
* embedded QR over its photo carousel, in the right column (the
|
|
11
|
+
* account dialog grows to that card); below `md` it is "Continue
|
|
12
|
+
* with Oxy" at the top. The passkey belongs to `oxy.so`: on
|
|
13
|
+
* auth.oxy.so (`page`) it runs here — the username with its Continue,
|
|
14
|
+
* a username-first ceremony that takes a hardware security key with
|
|
15
|
+
* no resident credential too, and the discoverable passkey — and in
|
|
16
|
+
* an app's dialog it opens auth.oxy.so's window for that one step, as
|
|
17
|
+
* does "Create account". On native it is "Continue with Oxy" ("Get
|
|
18
|
+
* Commons" without Commons).
|
|
19
19
|
*
|
|
20
20
|
* `signInMethods.ts` owns which blocks a platform gets.
|
|
21
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxySignInPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignInPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"OxySignInPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignInPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiC/B,MAAM,WAAW,mBAAmB;IAClC,wCAAwC;IACxC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,gCAAgC;IAChC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwTxD,CAAC"}
|
|
@@ -1,31 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Which sign-in methods a surface offers, from where it runs.
|
|
3
3
|
*
|
|
4
|
-
* One screen everywhere
|
|
4
|
+
* One screen everywhere, and sign-in happens IN it (ADR 0029 D1):
|
|
5
5
|
*
|
|
6
|
-
* -
|
|
7
|
-
*
|
|
8
|
-
* the
|
|
9
|
-
* on
|
|
10
|
-
* -
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* device that has no Commons to continue with.
|
|
6
|
+
* - the COMMONS way in — on the web the embedded QR (the split card's right
|
|
7
|
+
* column from `md`, with "Continue with Oxy" below `md`, where the screen
|
|
8
|
+
* is the phone that would scan it); on native "Continue with Oxy", and
|
|
9
|
+
* "Get Commons" on a device that has no Commons to continue with;
|
|
10
|
+
* - the PASSKEY — it belongs to `oxy.so`, so it runs right here on auth.oxy.so
|
|
11
|
+
* (`page`: the username with its Continue, and the discoverable passkey), and
|
|
12
|
+
* in an app's dialog on the web it opens auth.oxy.so's window for that one
|
|
13
|
+
* step (with account creation); native has none, Commons holds the identity.
|
|
15
14
|
*/
|
|
16
15
|
import type { CommonsAvailability } from '@oxy.so/core';
|
|
17
16
|
/**
|
|
18
|
-
* `qr` —
|
|
19
|
-
* `window` — an app on the web: "Continue with Oxy" opens auth.oxy.so's window.
|
|
17
|
+
* `qr` — the web: the embedded QR from `md`, "Continue with Oxy" below.
|
|
20
18
|
* `continue` — native "Continue with Oxy": Oxy picks the route (shared
|
|
21
19
|
* keychain, Commons on this device, a push, or the QR view).
|
|
22
20
|
* `get-commons` — native, and Commons is not installed here.
|
|
23
21
|
*/
|
|
24
|
-
export type CommonsEntry = 'qr' | '
|
|
22
|
+
export type CommonsEntry = 'qr' | 'continue' | 'get-commons';
|
|
23
|
+
/**
|
|
24
|
+
* `here` — auth.oxy.so: the username and the passkey run on this page.
|
|
25
|
+
* `window` — an app's dialog on the web: the passkey opens auth.oxy.so's window.
|
|
26
|
+
* `none` — native.
|
|
27
|
+
*/
|
|
28
|
+
export type PasskeyEntry = 'here' | 'window' | 'none';
|
|
25
29
|
export interface SignInMethods {
|
|
26
30
|
commons: CommonsEntry;
|
|
27
|
-
|
|
28
|
-
passkey: boolean;
|
|
31
|
+
passkey: PasskeyEntry;
|
|
29
32
|
}
|
|
30
33
|
export interface SignInSurfaceFacts {
|
|
31
34
|
/** Rendering in a browser (react-native-web), not a native app. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signInMethods.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/signInMethods.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"signInMethods.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/signInMethods.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,UAAU,GAAG,aAAa,CAAC;AAE7D;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEtD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,mEAAmE;IACnE,GAAG,EAAE,OAAO,CAAC;IACb,kEAAkE;IAClE,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,8DAA8D;IAC9D,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAQ7E"}
|
|
@@ -125,10 +125,10 @@ export interface OxyContextState {
|
|
|
125
125
|
*/
|
|
126
126
|
startWebOAuthSignIn: (options: StartWebOAuthSignInOptions) => Promise<WebOAuthSignInResult>;
|
|
127
127
|
/**
|
|
128
|
-
*
|
|
129
|
-
* (`recover`) in auth.oxy.so's window over the app
|
|
130
|
-
*
|
|
131
|
-
* opens with the gesture.
|
|
128
|
+
* The passkey sign-in (`signin`), account creation (`signup`) or recovery
|
|
129
|
+
* (`recover`) in auth.oxy.so's window over the app — the one step the
|
|
130
|
+
* account dialog cannot run itself, since the passkey belongs to `oxy.so`.
|
|
131
|
+
* Web only; call it from the press, so the window opens with the gesture.
|
|
132
132
|
*/
|
|
133
133
|
continueOnAuth: (screen: OxyAuthScreen) => Promise<WebOAuthSignInResult>;
|
|
134
134
|
/**
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A screen's say in how wide its surface is.
|
|
3
|
+
*
|
|
4
|
+
* `SurfaceScreen` is the ONE host that declares the surface's dialog frame, so
|
|
5
|
+
* a screen whose views need different widths (the account dialog: the 420 menu,
|
|
6
|
+
* the sign-in's 880 split card) hands its width to that host rather than
|
|
7
|
+
* declaring a second frame. A change morphs the centered card to it.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SurfaceFrameWidthContext: import("react").Context<((maxWidth: number | null) => void) | null>;
|
|
10
|
+
/** Ask the surface for `maxWidth` (px) while this is mounted; `null` keeps the surface's own. */
|
|
11
|
+
export declare function useSurfaceFrameWidth(maxWidth: number | null): void;
|
|
12
|
+
//# sourceMappingURL=useSurfaceFrameWidth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSurfaceFrameWidth.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useSurfaceFrameWidth.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,sCAA6B,MAAM,GAAG,IAAI,KAAK,IAAI,SAAe,CAAC;AAExG,iGAAiG;AACjG,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAOlE"}
|
|
@@ -16,8 +16,9 @@
|
|
|
16
16
|
*
|
|
17
17
|
* - `accounts` → `AccountsMenuView` — the signed-in Oxy account menu.
|
|
18
18
|
* - `add` / `signin` → `OxySignInPanel` — THE sign-in screen, the one
|
|
19
|
-
* auth.oxy.so renders too: the device's accounts, then
|
|
20
|
-
*
|
|
19
|
+
* auth.oxy.so renders too: the device's accounts, then the Commons way in
|
|
20
|
+
* (the embedded QR, or "Continue with Oxy"), then the passkey (on the web
|
|
21
|
+
* in an app, auth.oxy.so's window for that one step).
|
|
21
22
|
* - `qr` → `SignInRequestView` — the ACTIVE REQUEST: the controller-bound
|
|
22
23
|
* wiring over the shared, presentational `OxySignInRequestSurface` (the same
|
|
23
24
|
* component the auth.oxy.so IdP mounts from its OAuth-bound request). It maps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyAuthChooser.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAuthChooser.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"OxyAuthChooser.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAuthChooser.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoD/B,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED;;;;GAIG;AACH,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwXjD,CAAC;AA8BF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SurfaceScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/SurfaceScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8E,MAAM,OAAO,CAAC;AAUnG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAI9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"SurfaceScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/SurfaceScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8E,MAAM,OAAO,CAAC;AAUnG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAI9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAA+B,CAAC;AAuFrE,MAAM,WAAW,kBAAkB;IACjC,0DAA0D;IAC1D,QAAQ,EAAE,eAAe,CAAC;IAC1B,iFAAiF;IACjF,OAAO,EAAE,eAAe,CAAC;IACzB,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,iBAAS,aAAa,CAAC,EACrB,QAAQ,EACR,OAAO,EACP,iBAAwB,GACzB,EAAE,kBAAkB,4BAuKpB;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -27,10 +27,16 @@ export declare const OxyAuthScreen: React.FC<{
|
|
|
27
27
|
children: React.ReactNode;
|
|
28
28
|
className?: string;
|
|
29
29
|
}>;
|
|
30
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* The split card: `children` on the left and, from `md`, `aside` on the right.
|
|
32
|
+
* `bare` inside a surface that already is the card (the account dialog): no
|
|
33
|
+
* border of its own, and the right column is a rounded tile within the
|
|
34
|
+
* dialog's margins.
|
|
35
|
+
*/
|
|
31
36
|
export declare const OxyAuthSplit: React.FC<{
|
|
32
37
|
children: React.ReactNode;
|
|
33
38
|
aside: React.ReactNode;
|
|
39
|
+
bare?: boolean;
|
|
34
40
|
}>;
|
|
35
41
|
/**
|
|
36
42
|
* The screen while there is nothing to show yet. React Native's own indicator:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyAuthScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxyAuthScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAqBlE,CAAC;AAEF,wGAAwG;AACxG,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAErF,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"OxyAuthScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxyAuthScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAqBlE,CAAC;AAEF,wGAAwG;AACxG,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAErF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,CAuBxG,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAOlC,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAiBhC,CAAC"}
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
* differs (`host`).
|
|
5
5
|
*
|
|
6
6
|
* picker a returning device: "Choose an account", then "Use another account"
|
|
7
|
-
* entry the header, the Commons way in, and the way in for
|
|
8
|
-
* account. On
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
7
|
+
* entry the header, the Commons way in, the passkey, and the way in for
|
|
8
|
+
* someone with no account. On the web, from `md`, the screen is
|
|
9
|
+
* Bloom `AuthCard`'s split card and the Commons way in is the
|
|
10
|
+
* embedded QR over its photo carousel, in the right column (the
|
|
11
|
+
* account dialog grows to that card); below `md` it is "Continue
|
|
12
|
+
* with Oxy" at the top. The passkey belongs to `oxy.so`: on
|
|
13
|
+
* auth.oxy.so (`page`) it runs here — the username with its Continue,
|
|
14
|
+
* a username-first ceremony that takes a hardware security key with
|
|
15
|
+
* no resident credential too, and the discoverable passkey — and in
|
|
16
|
+
* an app's dialog it opens auth.oxy.so's window for that one step, as
|
|
17
|
+
* does "Create account". On native it is "Continue with Oxy" ("Get
|
|
18
|
+
* Commons" without Commons).
|
|
19
19
|
*
|
|
20
20
|
* `signInMethods.ts` owns which blocks a platform gets.
|
|
21
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxySignInPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignInPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"OxySignInPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignInPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiC/B,MAAM,WAAW,mBAAmB;IAClC,wCAAwC;IACxC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,gCAAgC;IAChC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwTxD,CAAC"}
|
|
@@ -1,31 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Which sign-in methods a surface offers, from where it runs.
|
|
3
3
|
*
|
|
4
|
-
* One screen everywhere
|
|
4
|
+
* One screen everywhere, and sign-in happens IN it (ADR 0029 D1):
|
|
5
5
|
*
|
|
6
|
-
* -
|
|
7
|
-
*
|
|
8
|
-
* the
|
|
9
|
-
* on
|
|
10
|
-
* -
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* device that has no Commons to continue with.
|
|
6
|
+
* - the COMMONS way in — on the web the embedded QR (the split card's right
|
|
7
|
+
* column from `md`, with "Continue with Oxy" below `md`, where the screen
|
|
8
|
+
* is the phone that would scan it); on native "Continue with Oxy", and
|
|
9
|
+
* "Get Commons" on a device that has no Commons to continue with;
|
|
10
|
+
* - the PASSKEY — it belongs to `oxy.so`, so it runs right here on auth.oxy.so
|
|
11
|
+
* (`page`: the username with its Continue, and the discoverable passkey), and
|
|
12
|
+
* in an app's dialog on the web it opens auth.oxy.so's window for that one
|
|
13
|
+
* step (with account creation); native has none, Commons holds the identity.
|
|
15
14
|
*/
|
|
16
15
|
import type { CommonsAvailability } from '@oxy.so/core';
|
|
17
16
|
/**
|
|
18
|
-
* `qr` —
|
|
19
|
-
* `window` — an app on the web: "Continue with Oxy" opens auth.oxy.so's window.
|
|
17
|
+
* `qr` — the web: the embedded QR from `md`, "Continue with Oxy" below.
|
|
20
18
|
* `continue` — native "Continue with Oxy": Oxy picks the route (shared
|
|
21
19
|
* keychain, Commons on this device, a push, or the QR view).
|
|
22
20
|
* `get-commons` — native, and Commons is not installed here.
|
|
23
21
|
*/
|
|
24
|
-
export type CommonsEntry = 'qr' | '
|
|
22
|
+
export type CommonsEntry = 'qr' | 'continue' | 'get-commons';
|
|
23
|
+
/**
|
|
24
|
+
* `here` — auth.oxy.so: the username and the passkey run on this page.
|
|
25
|
+
* `window` — an app's dialog on the web: the passkey opens auth.oxy.so's window.
|
|
26
|
+
* `none` — native.
|
|
27
|
+
*/
|
|
28
|
+
export type PasskeyEntry = 'here' | 'window' | 'none';
|
|
25
29
|
export interface SignInMethods {
|
|
26
30
|
commons: CommonsEntry;
|
|
27
|
-
|
|
28
|
-
passkey: boolean;
|
|
31
|
+
passkey: PasskeyEntry;
|
|
29
32
|
}
|
|
30
33
|
export interface SignInSurfaceFacts {
|
|
31
34
|
/** Rendering in a browser (react-native-web), not a native app. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signInMethods.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/signInMethods.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"signInMethods.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/signInMethods.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,UAAU,GAAG,aAAa,CAAC;AAE7D;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEtD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,mEAAmE;IACnE,GAAG,EAAE,OAAO,CAAC;IACb,kEAAkE;IAClE,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,8DAA8D;IAC9D,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAQ7E"}
|
|
@@ -125,10 +125,10 @@ export interface OxyContextState {
|
|
|
125
125
|
*/
|
|
126
126
|
startWebOAuthSignIn: (options: StartWebOAuthSignInOptions) => Promise<WebOAuthSignInResult>;
|
|
127
127
|
/**
|
|
128
|
-
*
|
|
129
|
-
* (`recover`) in auth.oxy.so's window over the app
|
|
130
|
-
*
|
|
131
|
-
* opens with the gesture.
|
|
128
|
+
* The passkey sign-in (`signin`), account creation (`signup`) or recovery
|
|
129
|
+
* (`recover`) in auth.oxy.so's window over the app — the one step the
|
|
130
|
+
* account dialog cannot run itself, since the passkey belongs to `oxy.so`.
|
|
131
|
+
* Web only; call it from the press, so the window opens with the gesture.
|
|
132
132
|
*/
|
|
133
133
|
continueOnAuth: (screen: OxyAuthScreen) => Promise<WebOAuthSignInResult>;
|
|
134
134
|
/**
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A screen's say in how wide its surface is.
|
|
3
|
+
*
|
|
4
|
+
* `SurfaceScreen` is the ONE host that declares the surface's dialog frame, so
|
|
5
|
+
* a screen whose views need different widths (the account dialog: the 420 menu,
|
|
6
|
+
* the sign-in's 880 split card) hands its width to that host rather than
|
|
7
|
+
* declaring a second frame. A change morphs the centered card to it.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SurfaceFrameWidthContext: import("react").Context<((maxWidth: number | null) => void) | null>;
|
|
10
|
+
/** Ask the surface for `maxWidth` (px) while this is mounted; `null` keeps the surface's own. */
|
|
11
|
+
export declare function useSurfaceFrameWidth(maxWidth: number | null): void;
|
|
12
|
+
//# sourceMappingURL=useSurfaceFrameWidth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSurfaceFrameWidth.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useSurfaceFrameWidth.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,sCAA6B,MAAM,GAAG,IAAI,KAAK,IAAI,SAAe,CAAC;AAExG,iGAAiG;AACjG,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAOlE"}
|
package/package.json
CHANGED
|
@@ -16,8 +16,9 @@
|
|
|
16
16
|
*
|
|
17
17
|
* - `accounts` → `AccountsMenuView` — the signed-in Oxy account menu.
|
|
18
18
|
* - `add` / `signin` → `OxySignInPanel` — THE sign-in screen, the one
|
|
19
|
-
* auth.oxy.so renders too: the device's accounts, then
|
|
20
|
-
*
|
|
19
|
+
* auth.oxy.so renders too: the device's accounts, then the Commons way in
|
|
20
|
+
* (the embedded QR, or "Continue with Oxy"), then the passkey (on the web
|
|
21
|
+
* in an app, auth.oxy.so's window for that one step).
|
|
21
22
|
* - `qr` → `SignInRequestView` — the ACTIVE REQUEST: the controller-bound
|
|
22
23
|
* wiring over the shared, presentational `OxySignInRequestSurface` (the same
|
|
23
24
|
* component the auth.oxy.so IdP mounts from its OAuth-bound request). It maps
|
|
@@ -112,10 +113,10 @@ const OxyAuthChooser: React.FC<OxyAuthChooserProps> = ({ onComplete }) => {
|
|
|
112
113
|
// so the two switchers cannot drift.
|
|
113
114
|
const { principals } = useDeviceSwitcher();
|
|
114
115
|
|
|
115
|
-
//
|
|
116
|
-
//
|
|
117
|
-
//
|
|
118
|
-
//
|
|
116
|
+
// Sign-in happens in this dialog. On the web the passkey and account
|
|
117
|
+
// creation open auth.oxy.so's window for that one step (`continueOnAuth`):
|
|
118
|
+
// the passkey belongs to that origin. Native has no passkey path: Commons
|
|
119
|
+
// owns identity there ('none').
|
|
119
120
|
const passkeyMode = useMemo<PasskeyMode>(() => (isWebBrowser() ? 'hub' : 'none'), []);
|
|
120
121
|
|
|
121
122
|
/** auth.oxy.so's window; this surface closes once it signs the app in. */
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
SurfaceHeaderContext,
|
|
25
25
|
type SurfaceHeaderContent,
|
|
26
26
|
} from '../hooks/useSurfaceHeader';
|
|
27
|
+
import { SurfaceFrameWidthContext } from '../hooks/useSurfaceFrameWidth';
|
|
27
28
|
import type { BaseScreenProps } from '../types/navigation';
|
|
28
29
|
|
|
29
30
|
/** Error boundary catching screen render failures, so one bad screen cannot blank the surface. */
|
|
@@ -213,17 +214,22 @@ function SurfaceScreen({
|
|
|
213
214
|
// container to a near-full-height, wider card and shrinks back on exit. Resolve
|
|
214
215
|
// its viewport-relative height to px here (the Dialog clamps to the viewport).
|
|
215
216
|
const { height: viewportHeight } = useWindowDimensions();
|
|
217
|
+
//
|
|
218
|
+
// A screen may also ask for a width of its own (`useSurfaceFrameWidth`) when
|
|
219
|
+
// its views differ in width; the width joins the frame's identity so each
|
|
220
|
+
// change morphs.
|
|
221
|
+
const [screenWidth, setScreenWidth] = useState<number | null>(null);
|
|
216
222
|
const frameSize = useMemo(() => {
|
|
217
223
|
const spec = config.frameSize;
|
|
218
|
-
if (!spec) return undefined;
|
|
224
|
+
if (!spec && screenWidth === null) return undefined;
|
|
219
225
|
const height =
|
|
220
|
-
spec
|
|
221
|
-
return { height, maxWidth: spec
|
|
222
|
-
}, [config.frameSize, viewportHeight]);
|
|
226
|
+
spec?.heightRatio !== undefined ? Math.round(viewportHeight * spec.heightRatio) : undefined;
|
|
227
|
+
return { height, maxWidth: screenWidth ?? spec?.maxWidth };
|
|
228
|
+
}, [config.frameSize, viewportHeight, screenWidth]);
|
|
223
229
|
useDialogFrame(
|
|
224
230
|
useMemo(
|
|
225
|
-
() => ({ key: `${top.route}#${top.step}`, morph: config.morph, size: frameSize }),
|
|
226
|
-
[top.route, top.step, config.morph, frameSize],
|
|
231
|
+
() => ({ key: `${top.route}#${top.step}#${screenWidth ?? ''}`, morph: config.morph, size: frameSize }),
|
|
232
|
+
[top.route, top.step, screenWidth, config.morph, frameSize],
|
|
227
233
|
),
|
|
228
234
|
);
|
|
229
235
|
// Show a back affordance whenever the surface can navigate back — either an
|
|
@@ -273,11 +279,13 @@ function SurfaceScreen({
|
|
|
273
279
|
|
|
274
280
|
return (
|
|
275
281
|
<SurfaceHeaderContext.Provider value={headerContext}>
|
|
276
|
-
<
|
|
277
|
-
<
|
|
278
|
-
<
|
|
279
|
-
|
|
280
|
-
|
|
282
|
+
<SurfaceFrameWidthContext.Provider value={setScreenWidth}>
|
|
283
|
+
<ScreenErrorBoundary screenName={top.route}>
|
|
284
|
+
<Suspense fallback={<ScreenPending />}>
|
|
285
|
+
<ScreenComponent {...screenProps} />
|
|
286
|
+
</Suspense>
|
|
287
|
+
</ScreenErrorBoundary>
|
|
288
|
+
</SurfaceFrameWidthContext.Provider>
|
|
281
289
|
</SurfaceHeaderContext.Provider>
|
|
282
290
|
);
|
|
283
291
|
}
|