@raystack/frontier 0.0.3 → 0.0.5
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/package.json +17 -15
- package/react/dist/index.d.ts +27 -9
- package/react/dist/index.js +1398 -769
- package/react/dist/index.mjs +1493 -849
- package/react/dist/logo-TXEPJWB5.png +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raystack/frontier",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "A js library for frontier",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -11,14 +11,6 @@
|
|
|
11
11
|
"react/dist/**/*",
|
|
12
12
|
"README.md"
|
|
13
13
|
],
|
|
14
|
-
"scripts": {
|
|
15
|
-
"build": "tsup",
|
|
16
|
-
"dev": "tsup --watch src",
|
|
17
|
-
"size": "size-limit",
|
|
18
|
-
"lint": "eslint \"./**/*.ts*\"",
|
|
19
|
-
"test": "echo \"Error: no test specified\" && exit 0",
|
|
20
|
-
"gen:client": "npx swagger-typescript-api -p ../../../../proto/apidocs.swagger.yaml -o client --modular"
|
|
21
|
-
},
|
|
22
14
|
"author": "pyadav9678@gmail.com",
|
|
23
15
|
"license": "Apache-2.0",
|
|
24
16
|
"lint-staged": {
|
|
@@ -49,28 +41,30 @@
|
|
|
49
41
|
},
|
|
50
42
|
"devDependencies": {
|
|
51
43
|
"@radix-ui/react-icons": "^1.3.0",
|
|
52
|
-
"@raystack/frontier-tsconfig": "workspace:^",
|
|
53
44
|
"@size-limit/preset-small-lib": "^8.2.6",
|
|
54
45
|
"@tanstack/react-table": "^8.9.3",
|
|
55
46
|
"@types/node": "^20.4.5",
|
|
56
47
|
"@types/react": "^18.2.5",
|
|
57
48
|
"@types/react-dom": "^18.2.7",
|
|
49
|
+
"esbuild-css-modules-plugin": "^2.7.1",
|
|
58
50
|
"esbuild-plugin-external-global": "^1.0.1",
|
|
59
51
|
"eslint": "^7.32.0",
|
|
60
|
-
"eslint-config-frontier": "workspace:^",
|
|
61
52
|
"np": "^7.7.0",
|
|
62
53
|
"prettier": "^2.5.1",
|
|
63
54
|
"size-limit": "^8.2.6",
|
|
64
55
|
"swagger-typescript-api": "^13.0.2",
|
|
65
56
|
"tsup": "^6.7.0",
|
|
66
|
-
"typescript": "^5.1.6"
|
|
57
|
+
"typescript": "^5.1.6",
|
|
58
|
+
"@raystack/frontier-tsconfig": "^0.0.0",
|
|
59
|
+
"eslint-config-frontier": "^0.0.0"
|
|
67
60
|
},
|
|
68
61
|
"dependencies": {
|
|
69
62
|
"@hookform/resolvers": "^3.1.1",
|
|
70
|
-
"@raystack/apsara": "0.10.
|
|
63
|
+
"@raystack/apsara": "0.10.9",
|
|
64
|
+
"@tanstack/react-router": "0.0.1-beta.174",
|
|
71
65
|
"axios": "^1.4.0",
|
|
66
|
+
"class-variance-authority": "^0.7.0",
|
|
72
67
|
"react-hook-form": "^7.45.2",
|
|
73
|
-
"react-router-dom": "^6.14.2",
|
|
74
68
|
"sonner": "^0.6.2",
|
|
75
69
|
"yup": "^1.2.0"
|
|
76
70
|
},
|
|
@@ -93,5 +87,13 @@
|
|
|
93
87
|
},
|
|
94
88
|
"publishConfig": {
|
|
95
89
|
"access": "public"
|
|
90
|
+
},
|
|
91
|
+
"scripts": {
|
|
92
|
+
"build": "tsup",
|
|
93
|
+
"dev": "tsup --watch src",
|
|
94
|
+
"size": "size-limit",
|
|
95
|
+
"lint": "eslint \"./**/*.ts*\"",
|
|
96
|
+
"test": "echo \"Error: no test specified\" && exit 0",
|
|
97
|
+
"gen:client": "npx swagger-typescript-api -p ../../../../proto/apidocs.swagger.yaml -o client --modular"
|
|
96
98
|
}
|
|
97
|
-
}
|
|
99
|
+
}
|
package/react/dist/index.d.ts
CHANGED
|
@@ -1,29 +1,36 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import React$1, { ComponentPropsWithRef, Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import * as _tanstack_router_core from '@tanstack/router-core';
|
|
3
|
+
import { Router, Route, RootRoute } from '@tanstack/react-router';
|
|
3
4
|
|
|
4
5
|
type ContainerProps = ComponentPropsWithRef<'div'> & {
|
|
5
|
-
children?:
|
|
6
|
+
children?: React$1.ReactNode;
|
|
6
7
|
shadow?: 'none' | 'xs' | 'sm' | 'md' | 'lg';
|
|
7
8
|
radius?: 'none' | 'xs' | 'sm' | 'md' | 'lg';
|
|
8
9
|
className?: string;
|
|
9
10
|
};
|
|
10
11
|
declare const Container: ({ children, shadow, radius, style, className }: ContainerProps) => JSX.Element;
|
|
11
12
|
|
|
13
|
+
type HeaderProps = ComponentPropsWithRef<'div'> & {
|
|
14
|
+
title?: string;
|
|
15
|
+
logo?: React$1.ReactNode;
|
|
16
|
+
};
|
|
17
|
+
declare const Header: ({ title, logo }: HeaderProps) => JSX.Element;
|
|
18
|
+
|
|
12
19
|
type MagicLinkVerifyProps = ComponentPropsWithRef<typeof Container> & {
|
|
13
|
-
logo?:
|
|
20
|
+
logo?: React$1.ReactNode;
|
|
14
21
|
title?: string;
|
|
15
22
|
};
|
|
16
23
|
declare const MagicLinkVerify: ({ logo, title, ...props }: MagicLinkVerifyProps) => JSX.Element;
|
|
17
24
|
|
|
18
25
|
type SignedInProps = ComponentPropsWithRef<typeof Container> & {
|
|
19
|
-
logo?:
|
|
26
|
+
logo?: React$1.ReactNode;
|
|
20
27
|
title?: string;
|
|
21
28
|
excludes?: string[];
|
|
22
29
|
};
|
|
23
30
|
declare const SignIn: ({ logo, title, excludes, ...props }: SignedInProps) => JSX.Element;
|
|
24
31
|
|
|
25
32
|
type SignUpProps = ComponentPropsWithRef<typeof Container> & {
|
|
26
|
-
logo?:
|
|
33
|
+
logo?: React$1.ReactNode;
|
|
27
34
|
title?: string;
|
|
28
35
|
excludes?: string[];
|
|
29
36
|
};
|
|
@@ -39,7 +46,13 @@ interface OrganizationProfileProps {
|
|
|
39
46
|
organizationId: string;
|
|
40
47
|
defaultRoute?: string;
|
|
41
48
|
}
|
|
49
|
+
declare const router: Router<Route<any, "/", "/", string, "__root__", unknown, {}, {}, {}, {}, {}, {}, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, {}, (Route<RootRoute<unknown, {}, _tanstack_router_core.RouteContext, {}>, "/", "/", string, "/", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, Route<Route<RootRoute<unknown, {}, _tanstack_router_core.RouteContext, {}>, "/", "/", string, "/", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute>, "/delete", "/delete", string, "/delete", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute>[], _tanstack_router_core.AnyRoute> | Route<RootRoute<unknown, {}, _tanstack_router_core.RouteContext, {}>, "/security", "/security", string, "/security", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute> | Route<RootRoute<unknown, {}, _tanstack_router_core.RouteContext, {}>, "/members", "/members", string, "/members", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, Route<Route<RootRoute<unknown, {}, _tanstack_router_core.RouteContext, {}>, "/members", "/members", string, "/members", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute>, "/modal", "/members/modal", string, "/members/modal", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute>[], _tanstack_router_core.AnyRoute> | Route<RootRoute<unknown, {}, _tanstack_router_core.RouteContext, {}>, "/teams", "/teams", string, "/teams", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, Route<Route<RootRoute<unknown, {}, _tanstack_router_core.RouteContext, {}>, "/teams", "/teams", string, "/teams", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute>, "/modal", "/teams/modal", string, "/teams/modal", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute>[], _tanstack_router_core.AnyRoute> | Route<RootRoute<unknown, {}, _tanstack_router_core.RouteContext, {}>, "/domains", "/domains", string, "/domains", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, (Route<Route<RootRoute<unknown, {}, _tanstack_router_core.RouteContext, {}>, "/domains", "/domains", string, "/domains", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute>, "/modal", "/domains/modal", string, "/domains/modal", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute> | Route<Route<RootRoute<unknown, {}, _tanstack_router_core.RouteContext, {}>, "/domains", "/domains", string, "/domains", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute>, "/$domainId/verify", "/domains/$domainId/verify", string, "/domains/$domainId/verify", unknown, {}, {}, Record<"domainId", string>, Record<never, string> & Record<"domainId", string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute>)[], _tanstack_router_core.AnyRoute> | Route<RootRoute<unknown, {}, _tanstack_router_core.RouteContext, {}>, "/teams/$teamId", "/teams/$teamId", string, "/teams/$teamId", unknown, {}, {}, Record<"teamId", string>, Record<"teamId", string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, Route<Route<RootRoute<unknown, {}, _tanstack_router_core.RouteContext, {}>, "/teams/$teamId", "/teams/$teamId", string, "/teams/$teamId", unknown, {}, {}, Record<"teamId", string>, Record<"teamId", string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute>, "/delete", "/teams/$teamId/delete", string, "/teams/$teamId/delete", unknown, {}, {}, Record<never, string>, Record<"teamId", string> & Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute>[], _tanstack_router_core.AnyRoute> | Route<RootRoute<unknown, {}, _tanstack_router_core.RouteContext, {}>, "/projects", "/projects", string, "/projects", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, Route<Route<RootRoute<unknown, {}, _tanstack_router_core.RouteContext, {}>, "/projects", "/projects", string, "/projects", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute>, "/modal", "/projects/modal", string, "/projects/modal", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute>[], _tanstack_router_core.AnyRoute> | Route<RootRoute<unknown, {}, _tanstack_router_core.RouteContext, {}>, "/projects/$projectId", "/projects/$projectId", string, "/projects/$projectId", unknown, {}, {}, Record<"projectId", string>, Record<"projectId", string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, Route<Route<RootRoute<unknown, {}, _tanstack_router_core.RouteContext, {}>, "/projects/$projectId", "/projects/$projectId", string, "/projects/$projectId", unknown, {}, {}, Record<"projectId", string>, Record<"projectId", string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute>, "/delete", "/projects/$projectId/delete", string, "/projects/$projectId/delete", unknown, {}, {}, Record<never, string>, Record<"projectId", string> & Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute>[], _tanstack_router_core.AnyRoute> | Route<RootRoute<unknown, {}, _tanstack_router_core.RouteContext, {}>, "/profile", "/profile", string, "/profile", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute> | Route<RootRoute<unknown, {}, _tanstack_router_core.RouteContext, {}>, "/perferences", "/perferences", string, "/perferences", unknown, {}, {}, Record<never, string>, Record<never, string>, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.RouteContext, _tanstack_router_core.AnyContext, unknown, _tanstack_router_core.AnyRoute>)[], any>, Record<string, any>>;
|
|
42
50
|
declare const OrganizationProfile: ({ organizationId, defaultRoute }: OrganizationProfileProps) => JSX.Element;
|
|
51
|
+
declare module '@tanstack/react-router' {
|
|
52
|
+
interface Register {
|
|
53
|
+
router: typeof router;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
43
56
|
|
|
44
57
|
interface WindowProps extends React.HTMLAttributes<HTMLDialogElement> {
|
|
45
58
|
open?: boolean;
|
|
@@ -60,7 +73,7 @@ interface InitialState {
|
|
|
60
73
|
}
|
|
61
74
|
interface FrontierProviderProps {
|
|
62
75
|
config: FrontierClientOptions;
|
|
63
|
-
children:
|
|
76
|
+
children: React$1.ReactNode;
|
|
64
77
|
initialState?: InitialState;
|
|
65
78
|
}
|
|
66
79
|
|
|
@@ -2665,9 +2678,14 @@ interface FrontierContextProviderProps {
|
|
|
2665
2678
|
setStrategies: Dispatch<SetStateAction<V1Beta1AuthStrategy[]>>;
|
|
2666
2679
|
user: V1Beta1User | undefined;
|
|
2667
2680
|
setUser: Dispatch<SetStateAction<V1Beta1User | undefined>>;
|
|
2681
|
+
activeOrganization: V1Beta1Organization | undefined;
|
|
2682
|
+
setActiveOrganization: Dispatch<SetStateAction<V1Beta1Organization | undefined>>;
|
|
2668
2683
|
}
|
|
2669
2684
|
declare function useFrontier(): FrontierContextProviderProps;
|
|
2670
2685
|
|
|
2671
|
-
declare const FrontierProvider:
|
|
2686
|
+
declare const FrontierProvider: {
|
|
2687
|
+
(props: FrontierProviderProps): JSX.Element;
|
|
2688
|
+
displayName: string;
|
|
2689
|
+
};
|
|
2672
2690
|
|
|
2673
|
-
export { Container, CreateOrganization, FrontierProvider, MagicLinkVerify, OrganizationProfile, SignIn, SignUp, Window, useFrontier };
|
|
2691
|
+
export { Container, CreateOrganization, FrontierProvider, Header, MagicLinkVerify, OrganizationProfile, SignIn, SignUp, Window, useFrontier };
|