@schematichq/schematic-react 0.2.0-rc.5 → 0.2.0-rc.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/schematic-react.cjs.js +845 -577
- package/dist/schematic-react.d.ts +16 -17
- package/dist/schematic-react.esm.js +877 -609
- package/package.json +2 -2
@@ -15,6 +15,7 @@ import { HTMLAttributes } from 'react';
|
|
15
15
|
import { IStyledComponentBase } from 'styled-components/dist/types';
|
16
16
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
17
17
|
import { Keys } from '@schematichq/schematic-js';
|
18
|
+
import { default as React_2 } from 'react';
|
18
19
|
import { RefAttributes } from 'react';
|
19
20
|
import { RefObject } from 'react';
|
20
21
|
import { Schematic } from '@schematichq/schematic-js';
|
@@ -76,7 +77,7 @@ declare class BaseAPI {
|
|
76
77
|
}
|
77
78
|
|
78
79
|
declare type BaseSchematicProviderProps = Omit<SchematicJS.SchematicOptions, "client" | "publishableKey"> & {
|
79
|
-
children:
|
80
|
+
children: React_2.ReactNode;
|
80
81
|
};
|
81
82
|
|
82
83
|
/**
|
@@ -1162,6 +1163,8 @@ export declare interface EmbedContextProps {
|
|
1162
1163
|
stripe: Promise<Stripe | null> | null;
|
1163
1164
|
layout: EmbedLayout;
|
1164
1165
|
error?: Error;
|
1166
|
+
isPending: boolean;
|
1167
|
+
hydrate: () => void;
|
1165
1168
|
setData: (data: RecursivePartial<ComponentHydrateResponseData>) => void;
|
1166
1169
|
updateSettings: (settings: RecursivePartial<EmbedSettings>) => void;
|
1167
1170
|
setStripe: (stripe: Promise<Stripe | null> | null) => void;
|
@@ -1950,7 +1953,7 @@ export declare const IconRound: ({ name, variant, size, colors, ...props }: Icon
|
|
1950
1953
|
export declare interface IconRoundProps extends React.HTMLAttributes<HTMLElement> {
|
1951
1954
|
name: IconNameTypes;
|
1952
1955
|
variant?: "outline" | "filled";
|
1953
|
-
size?: "tn" | "sm" | "md" | "lg";
|
1956
|
+
size?: "tn" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
|
1954
1957
|
colors?: [string, string];
|
1955
1958
|
}
|
1956
1959
|
|
@@ -2105,18 +2108,19 @@ declare interface Middleware {
|
|
2105
2108
|
onError?(context: ErrorContext): Promise<Response | void>;
|
2106
2109
|
}
|
2107
2110
|
|
2108
|
-
export declare const Modal: ({ children, onClose }: ModalProps) => JSX_2.Element;
|
2111
|
+
export declare const Modal: ({ children, size, onClose }: ModalProps) => JSX_2.Element;
|
2109
2112
|
|
2110
|
-
export declare const ModalHeader: ({ children, onClose }: ModalHeaderProps) => JSX_2.Element;
|
2113
|
+
export declare const ModalHeader: ({ children, bordered, onClose, }: ModalHeaderProps) => JSX_2.Element;
|
2111
2114
|
|
2112
2115
|
declare interface ModalHeaderProps {
|
2113
2116
|
children: React.ReactNode;
|
2117
|
+
bordered?: boolean;
|
2114
2118
|
onClose?: () => void;
|
2115
2119
|
}
|
2116
2120
|
|
2117
2121
|
declare interface ModalProps {
|
2118
2122
|
children: React.ReactNode;
|
2119
|
-
size?: "md" | "lg";
|
2123
|
+
size?: "sm" | "md" | "lg" | "auto";
|
2120
2124
|
onClose?: () => void;
|
2121
2125
|
}
|
2122
2126
|
|
@@ -2205,12 +2209,6 @@ declare interface PaymentMethodResponseData {
|
|
2205
2209
|
* @memberof PaymentMethodResponseData
|
2206
2210
|
*/
|
2207
2211
|
id: string;
|
2208
|
-
/**
|
2209
|
-
*
|
2210
|
-
* @type {string}
|
2211
|
-
* @memberof PaymentMethodResponseData
|
2212
|
-
*/
|
2213
|
-
invoiceExternalId?: string | null;
|
2214
2212
|
/**
|
2215
2213
|
*
|
2216
2214
|
* @type {string}
|
@@ -2848,8 +2846,7 @@ export { Schematic }
|
|
2848
2846
|
export { SchematicContext }
|
2849
2847
|
|
2850
2848
|
declare interface SchematicContextProps {
|
2851
|
-
client
|
2852
|
-
flagValues: Record<string, boolean>;
|
2849
|
+
client: SchematicJS.Schematic;
|
2853
2850
|
}
|
2854
2851
|
|
2855
2852
|
export declare const SchematicEmbed: ({ id, accessToken, apiConfig }: EmbedProps) => JSX_2.Element;
|
@@ -2860,7 +2857,7 @@ export declare interface SchematicHookOpts {
|
|
2860
2857
|
|
2861
2858
|
export { SchematicOptions }
|
2862
2859
|
|
2863
|
-
export declare const SchematicProvider:
|
2860
|
+
export declare const SchematicProvider: React_2.FC<SchematicProviderProps>;
|
2864
2861
|
|
2865
2862
|
export declare type SchematicProviderProps = SchematicProviderPropsWithClient | SchematicProviderPropsWithPublishableKey;
|
2866
2863
|
|
@@ -2960,12 +2957,12 @@ export declare const useEmbed: () => EmbedContextProps;
|
|
2960
2957
|
export declare const useSchematic: () => SchematicContextProps;
|
2961
2958
|
|
2962
2959
|
export declare const useSchematicContext: (opts?: SchematicHookOpts) => {
|
2963
|
-
setContext: (
|
2960
|
+
setContext: (context: SchematicJS.SchematicContext) => Promise<void>;
|
2964
2961
|
};
|
2965
2962
|
|
2966
2963
|
export declare const useSchematicEvents: (opts?: SchematicHookOpts) => {
|
2967
|
-
track: (
|
2968
|
-
identify: (
|
2964
|
+
track: (body: SchematicJS.EventBodyTrack) => Promise<void>;
|
2965
|
+
identify: (body: SchematicJS.EventBodyIdentify) => Promise<void>;
|
2969
2966
|
};
|
2970
2967
|
|
2971
2968
|
export declare const useSchematicFlag: (key: string, opts?: UseSchematicFlagOpts) => boolean;
|
@@ -2974,6 +2971,8 @@ export declare type UseSchematicFlagOpts = SchematicHookOpts & {
|
|
2974
2971
|
fallback?: boolean;
|
2975
2972
|
};
|
2976
2973
|
|
2974
|
+
export declare const useSchematicIsPending: (opts?: SchematicHookOpts) => boolean;
|
2975
|
+
|
2977
2976
|
export declare const Viewport: ForwardRefExoticComponent<Omit<ViewportProps, "ref"> & RefAttributes<HTMLDivElement | null>>;
|
2978
2977
|
|
2979
2978
|
export declare interface ViewportProps extends React.HTMLProps<HTMLDivElement> {
|