@raystack/frontier 0.0.3 → 0.0.4
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 +1 -1
- package/react/dist/index.d.ts +10 -8
- package/react/dist/index.js +5 -5
- package/react/dist/index.mjs +5 -5
- package/react/dist/logo-TXEPJWB5.png +0 -0
package/package.json
CHANGED
package/react/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React__default, { ComponentPropsWithRef, Dispatch, SetStateAction } from 'react';
|
|
1
|
+
import React$1, { ComponentPropsWithRef, Dispatch, SetStateAction } from 'react';
|
|
3
2
|
|
|
4
3
|
type ContainerProps = ComponentPropsWithRef<'div'> & {
|
|
5
|
-
children?:
|
|
4
|
+
children?: React$1.ReactNode;
|
|
6
5
|
shadow?: 'none' | 'xs' | 'sm' | 'md' | 'lg';
|
|
7
6
|
radius?: 'none' | 'xs' | 'sm' | 'md' | 'lg';
|
|
8
7
|
className?: string;
|
|
@@ -10,20 +9,20 @@ type ContainerProps = ComponentPropsWithRef<'div'> & {
|
|
|
10
9
|
declare const Container: ({ children, shadow, radius, style, className }: ContainerProps) => JSX.Element;
|
|
11
10
|
|
|
12
11
|
type MagicLinkVerifyProps = ComponentPropsWithRef<typeof Container> & {
|
|
13
|
-
logo?:
|
|
12
|
+
logo?: React$1.ReactNode;
|
|
14
13
|
title?: string;
|
|
15
14
|
};
|
|
16
15
|
declare const MagicLinkVerify: ({ logo, title, ...props }: MagicLinkVerifyProps) => JSX.Element;
|
|
17
16
|
|
|
18
17
|
type SignedInProps = ComponentPropsWithRef<typeof Container> & {
|
|
19
|
-
logo?:
|
|
18
|
+
logo?: React$1.ReactNode;
|
|
20
19
|
title?: string;
|
|
21
20
|
excludes?: string[];
|
|
22
21
|
};
|
|
23
22
|
declare const SignIn: ({ logo, title, excludes, ...props }: SignedInProps) => JSX.Element;
|
|
24
23
|
|
|
25
24
|
type SignUpProps = ComponentPropsWithRef<typeof Container> & {
|
|
26
|
-
logo?:
|
|
25
|
+
logo?: React$1.ReactNode;
|
|
27
26
|
title?: string;
|
|
28
27
|
excludes?: string[];
|
|
29
28
|
};
|
|
@@ -60,7 +59,7 @@ interface InitialState {
|
|
|
60
59
|
}
|
|
61
60
|
interface FrontierProviderProps {
|
|
62
61
|
config: FrontierClientOptions;
|
|
63
|
-
children:
|
|
62
|
+
children: React$1.ReactNode;
|
|
64
63
|
initialState?: InitialState;
|
|
65
64
|
}
|
|
66
65
|
|
|
@@ -2668,6 +2667,9 @@ interface FrontierContextProviderProps {
|
|
|
2668
2667
|
}
|
|
2669
2668
|
declare function useFrontier(): FrontierContextProviderProps;
|
|
2670
2669
|
|
|
2671
|
-
declare const FrontierProvider:
|
|
2670
|
+
declare const FrontierProvider: {
|
|
2671
|
+
(props: FrontierProviderProps): JSX.Element;
|
|
2672
|
+
displayName: string;
|
|
2673
|
+
};
|
|
2672
2674
|
|
|
2673
2675
|
export { Container, CreateOrganization, FrontierProvider, MagicLinkVerify, OrganizationProfile, SignIn, SignUp, Window, useFrontier };
|
package/react/dist/index.js
CHANGED
|
@@ -6224,7 +6224,7 @@ var Window = (_a) => {
|
|
|
6224
6224
|
var import_react28 = __toESM(require("react"));
|
|
6225
6225
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
6226
6226
|
var counts = /* @__PURE__ */ new Map();
|
|
6227
|
-
function useMaxAllowedInstancesGuard(name, error, maxCount =
|
|
6227
|
+
function useMaxAllowedInstancesGuard(name, error, maxCount = 2) {
|
|
6228
6228
|
import_react28.default.useEffect(() => {
|
|
6229
6229
|
const count = counts.get(name) || 0;
|
|
6230
6230
|
if (count == maxCount) {
|
|
@@ -6249,7 +6249,7 @@ function withMaxAllowedInstancesGuard(WrappedComponent, name, error) {
|
|
|
6249
6249
|
// react/contexts/FrontierProvider.tsx
|
|
6250
6250
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
6251
6251
|
var multipleFrontierProvidersError = "Frontier: You've added multiple <FrontierProvider> components in your React component tree. Wrap your components in a single <FrontierProvider>.";
|
|
6252
|
-
var
|
|
6252
|
+
var FrontierProvider = (props) => {
|
|
6253
6253
|
const _a = props, { children, initialState, config } = _a, options = __objRest(_a, ["children", "initialState", "config"]);
|
|
6254
6254
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6255
6255
|
FrontierContextProvider,
|
|
@@ -6261,12 +6261,12 @@ var FrontierProviderBase = (props) => {
|
|
|
6261
6261
|
})
|
|
6262
6262
|
);
|
|
6263
6263
|
};
|
|
6264
|
-
|
|
6265
|
-
|
|
6264
|
+
FrontierProvider.displayName = "FrontierProvider";
|
|
6265
|
+
var FrontierProviderGaurd = withMaxAllowedInstancesGuard(
|
|
6266
|
+
FrontierProvider,
|
|
6266
6267
|
"FrontierProvider",
|
|
6267
6268
|
multipleFrontierProvidersError
|
|
6268
6269
|
);
|
|
6269
|
-
FrontierProvider.displayName = "FrontierProvider";
|
|
6270
6270
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6271
6271
|
0 && (module.exports = {
|
|
6272
6272
|
Container,
|
package/react/dist/index.mjs
CHANGED
|
@@ -6300,7 +6300,7 @@ var Window = (_a) => {
|
|
|
6300
6300
|
import React6 from "react";
|
|
6301
6301
|
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
6302
6302
|
var counts = /* @__PURE__ */ new Map();
|
|
6303
|
-
function useMaxAllowedInstancesGuard(name, error, maxCount =
|
|
6303
|
+
function useMaxAllowedInstancesGuard(name, error, maxCount = 2) {
|
|
6304
6304
|
React6.useEffect(() => {
|
|
6305
6305
|
const count = counts.get(name) || 0;
|
|
6306
6306
|
if (count == maxCount) {
|
|
@@ -6325,7 +6325,7 @@ function withMaxAllowedInstancesGuard(WrappedComponent, name, error) {
|
|
|
6325
6325
|
// react/contexts/FrontierProvider.tsx
|
|
6326
6326
|
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
6327
6327
|
var multipleFrontierProvidersError = "Frontier: You've added multiple <FrontierProvider> components in your React component tree. Wrap your components in a single <FrontierProvider>.";
|
|
6328
|
-
var
|
|
6328
|
+
var FrontierProvider = (props) => {
|
|
6329
6329
|
const _a = props, { children, initialState, config } = _a, options = __objRest(_a, ["children", "initialState", "config"]);
|
|
6330
6330
|
return /* @__PURE__ */ jsx46(
|
|
6331
6331
|
FrontierContextProvider,
|
|
@@ -6337,12 +6337,12 @@ var FrontierProviderBase = (props) => {
|
|
|
6337
6337
|
})
|
|
6338
6338
|
);
|
|
6339
6339
|
};
|
|
6340
|
-
|
|
6341
|
-
|
|
6340
|
+
FrontierProvider.displayName = "FrontierProvider";
|
|
6341
|
+
var FrontierProviderGaurd = withMaxAllowedInstancesGuard(
|
|
6342
|
+
FrontierProvider,
|
|
6342
6343
|
"FrontierProvider",
|
|
6343
6344
|
multipleFrontierProvidersError
|
|
6344
6345
|
);
|
|
6345
|
-
FrontierProvider.displayName = "FrontierProvider";
|
|
6346
6346
|
export {
|
|
6347
6347
|
Container,
|
|
6348
6348
|
CreateOrganization,
|
|
Binary file
|