@graphcore/react-kernel 0.1.0 → 0.2.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/dist/components/Auth/AuthPage.d.ts +5 -4
- package/dist/components/Invite/InviteRoute.d.ts +7 -6
- package/dist/components/Invite/index.d.ts +1 -1
- package/dist/components/Routes/GraphCoreApp.d.ts +3 -4
- package/dist/graphcore-react-kernel.cjs.js +1 -1
- package/dist/graphcore-react-kernel.es.js +503 -517
- package/dist/hooks/useOffersRegistration.d.ts +2 -0
- package/dist/lib/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -6,9 +6,10 @@ export interface AuthPageProps {
|
|
|
6
6
|
title?: string;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
* Sends the user to the issuer to sign in or create an account
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* the
|
|
9
|
+
* Sends the user to the issuer to sign in, or to create an account where the
|
|
10
|
+
* issuer has a registration page; while a stored session is restored or a
|
|
11
|
+
* sign-in starts, it shows only a wait. On an invite link it says so, and
|
|
12
|
+
* sign-in returns to the link. The app reloads signed in; the parent's
|
|
13
|
+
* useAuth().isAuthenticated flip re-renders the gate.
|
|
13
14
|
*/
|
|
14
15
|
export declare const AuthPage: React.FC<AuthPageProps>;
|
|
@@ -7,14 +7,15 @@ export type RedeemedInvite = {
|
|
|
7
7
|
export interface InviteRouteProps {
|
|
8
8
|
/** Called once the invite is redeemed. Default: open the resource's entity page. */
|
|
9
9
|
onRedeemed?: (invite: RedeemedInvite) => void;
|
|
10
|
-
/** The app's name on the invite page. Default `graphcore`. */
|
|
11
|
-
title?: string;
|
|
12
10
|
}
|
|
13
11
|
/** The link to share for an invite `token`. The token rides in the fragment, so it never reaches a server log. */
|
|
14
12
|
export declare function inviteUrl(token: string): string;
|
|
13
|
+
/** Whether this page is an invite link, so the app's sign-in screen can say why it is asking. */
|
|
14
|
+
export declare function usePendingInvite(): boolean;
|
|
15
15
|
/**
|
|
16
|
-
* Mount at `INVITE_ROUTE
|
|
17
|
-
*
|
|
18
|
-
*
|
|
16
|
+
* Mount at `INVITE_ROUTE` behind the app's sign-in screen, like any signed-in
|
|
17
|
+
* page. Sign-in returns to the full URL, token included, so an invitee signs in
|
|
18
|
+
* or creates an account on the app's own screen and lands here signed in; this
|
|
19
|
+
* route redeems the invite and hands it to `onRedeemed`.
|
|
19
20
|
*/
|
|
20
|
-
export declare function InviteRoute({ onRedeemed
|
|
21
|
+
export declare function InviteRoute({ onRedeemed }: InviteRouteProps): React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { INVITE_ROUTE, InviteRoute, inviteUrl } from './InviteRoute';
|
|
1
|
+
export { INVITE_ROUTE, InviteRoute, inviteUrl, usePendingInvite } from './InviteRoute';
|
|
2
2
|
export type { InviteRouteProps, RedeemedInvite } from './InviteRoute';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* The default signed-in GraphCore app: the
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* admin, the server's route table) under the top bar. Pass your own layout
|
|
3
|
+
* The default signed-in GraphCore app: the sign-in page until a principal is
|
|
4
|
+
* signed in, then entity pages full-screen and everything else (home, admin,
|
|
5
|
+
* invites, the server's route table) under the top bar. Pass your own layout
|
|
7
6
|
* to `GraphCoreRouter`'s `app` when this one does not fit.
|
|
8
7
|
*/
|
|
9
8
|
export declare function GraphCoreApp({ topBar }: {
|