@schematichq/schematic-components 0.3.6 → 0.3.8

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.
@@ -1,3 +1,4 @@
1
+ import { Component } from 'react';
1
2
  import { Context } from 'react';
2
3
  import * as Craft from '@craftjs/core';
3
4
  import { DetailedHTMLProps } from 'react';
@@ -61,61 +62,6 @@ declare class BaseAPI {
61
62
  private clone;
62
63
  }
63
64
 
64
- /**
65
- * Schematic API
66
- * Schematic API
67
- *
68
- * The version of the OpenAPI document: 0.1
69
- *
70
- *
71
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
72
- * https://openapi-generator.tech
73
- * Do not edit the class manually.
74
- */
75
- /**
76
- *
77
- * @export
78
- * @interface BillingPlan
79
- */
80
- declare interface BillingPlan {
81
- /**
82
- *
83
- * @type {string}
84
- * @memberof BillingPlan
85
- */
86
- description?: string | null;
87
- /**
88
- *
89
- * @type {string}
90
- * @memberof BillingPlan
91
- */
92
- id: string;
93
- /**
94
- *
95
- * @type {string}
96
- * @memberof BillingPlan
97
- */
98
- imageUrl?: string | null;
99
- /**
100
- *
101
- * @type {string}
102
- * @memberof BillingPlan
103
- */
104
- name: string;
105
- /**
106
- *
107
- * @type {string}
108
- * @memberof BillingPlan
109
- */
110
- planPeriod?: string | null;
111
- /**
112
- *
113
- * @type {number}
114
- * @memberof BillingPlan
115
- */
116
- planPrice?: number | null;
117
- }
118
-
119
65
  /**
120
66
  * Schematic API
121
67
  * Schematic API
@@ -522,6 +468,8 @@ declare class CheckoutApi extends runtime.BaseAPI {
522
468
  updatePaymentMethod(requestParameters: UpdatePaymentMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdatePaymentMethodResponse>;
523
469
  }
524
470
 
471
+ export declare const CheckoutDialog: () => JSX_2.Element;
472
+
525
473
  declare interface CheckoutRequest {
526
474
  changeSubscriptionRequestBody: ChangeSubscriptionRequestBody;
527
475
  }
@@ -567,10 +515,10 @@ export declare interface ColumnProps extends React.HTMLProps<HTMLDivElement> {
567
515
  declare interface CompanyDetailResponseData {
568
516
  /**
569
517
  *
570
- * @type {Array<BillingPlan>}
518
+ * @type {Array<CompanyPlanWithBillingSubView>}
571
519
  * @memberof CompanyDetailResponseData
572
520
  */
573
- addOns: Array<BillingPlan>;
521
+ addOns: Array<CompanyPlanWithBillingSubView>;
574
522
  /**
575
523
  *
576
524
  * @type {Array<BillingSubscriptionResponseData>}
@@ -627,16 +575,16 @@ declare interface CompanyDetailResponseData {
627
575
  name: string;
628
576
  /**
629
577
  *
630
- * @type {BillingPlan}
578
+ * @type {CompanyPlanWithBillingSubView}
631
579
  * @memberof CompanyDetailResponseData
632
580
  */
633
- plan?: BillingPlan;
581
+ plan?: CompanyPlanWithBillingSubView;
634
582
  /**
635
583
  *
636
- * @type {Array<PreviewObject>}
584
+ * @type {Array<GenericPreviewObject>}
637
585
  * @memberof CompanyDetailResponseData
638
586
  */
639
- plans: Array<PreviewObject>;
587
+ plans: Array<GenericPreviewObject>;
640
588
  /**
641
589
  * A map of trait names to trait values
642
590
  * @type {object}
@@ -767,6 +715,67 @@ declare interface CompanyPlanDetailResponseData {
767
715
  yearlyPrice?: BillingPriceResponseData;
768
716
  }
769
717
 
718
+ /**
719
+ * Schematic API
720
+ * Schematic API
721
+ *
722
+ * The version of the OpenAPI document: 0.1
723
+ *
724
+ *
725
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
726
+ * https://openapi-generator.tech
727
+ * Do not edit the class manually.
728
+ */
729
+ /**
730
+ *
731
+ * @export
732
+ * @interface CompanyPlanWithBillingSubView
733
+ */
734
+ declare interface CompanyPlanWithBillingSubView {
735
+ /**
736
+ *
737
+ * @type {string}
738
+ * @memberof CompanyPlanWithBillingSubView
739
+ */
740
+ billingProductId?: string | null;
741
+ /**
742
+ *
743
+ * @type {string}
744
+ * @memberof CompanyPlanWithBillingSubView
745
+ */
746
+ description?: string | null;
747
+ /**
748
+ *
749
+ * @type {string}
750
+ * @memberof CompanyPlanWithBillingSubView
751
+ */
752
+ id: string;
753
+ /**
754
+ *
755
+ * @type {string}
756
+ * @memberof CompanyPlanWithBillingSubView
757
+ */
758
+ imageUrl?: string | null;
759
+ /**
760
+ *
761
+ * @type {string}
762
+ * @memberof CompanyPlanWithBillingSubView
763
+ */
764
+ name: string;
765
+ /**
766
+ *
767
+ * @type {string}
768
+ * @memberof CompanyPlanWithBillingSubView
769
+ */
770
+ planPeriod?: string | null;
771
+ /**
772
+ *
773
+ * @type {number}
774
+ * @memberof CompanyPlanWithBillingSubView
775
+ */
776
+ planPrice?: number | null;
777
+ }
778
+
770
779
  /**
771
780
  *
772
781
  * @export
@@ -1094,27 +1103,21 @@ export declare const defaultTheme: EmbedThemeSettings;
1094
1103
  declare interface DesignProps {
1095
1104
  header: {
1096
1105
  isVisible: boolean;
1097
- title: {
1098
- fontStyle: FontStyle;
1099
- };
1100
- description: {
1101
- isVisible: boolean;
1102
- fontStyle: FontStyle;
1103
- };
1104
- price: {
1105
- isVisible: boolean;
1106
- fontStyle: FontStyle;
1107
- };
1106
+ fontStyle: FontStyle;
1107
+ text: string;
1108
1108
  };
1109
- addOns: {
1109
+ icons: {
1110
1110
  isVisible: boolean;
1111
1111
  fontStyle: FontStyle;
1112
- showLabel: boolean;
1112
+ style: "light" | "dark";
1113
1113
  };
1114
- callToAction: {
1114
+ entitlement: {
1115
1115
  isVisible: boolean;
1116
- buttonSize: "sm" | "md" | "lg";
1117
- buttonStyle: "primary" | "secondary" | "tertiary";
1116
+ fontStyle: FontStyle;
1117
+ };
1118
+ usage: {
1119
+ isVisible: boolean;
1120
+ fontStyle: FontStyle;
1118
1121
  };
1119
1122
  }
1120
1123
 
@@ -1122,18 +1125,20 @@ declare interface DesignProps_2 {
1122
1125
  header: {
1123
1126
  isVisible: boolean;
1124
1127
  fontStyle: FontStyle;
1125
- text: string;
1126
1128
  };
1127
- icons: {
1129
+ date: {
1128
1130
  isVisible: boolean;
1129
1131
  fontStyle: FontStyle;
1130
- style: "light" | "dark";
1131
1132
  };
1132
- entitlement: {
1133
+ amount: {
1133
1134
  isVisible: boolean;
1134
1135
  fontStyle: FontStyle;
1135
1136
  };
1136
- usage: {
1137
+ limit: {
1138
+ isVisible: boolean;
1139
+ number: number;
1140
+ };
1141
+ collapse: {
1137
1142
  isVisible: boolean;
1138
1143
  fontStyle: FontStyle;
1139
1144
  };
@@ -1159,34 +1164,43 @@ declare interface DesignProps_3 {
1159
1164
  isVisible: boolean;
1160
1165
  fontStyle: FontStyle;
1161
1166
  };
1162
- visibleFeatures: string[];
1163
1167
  }
1164
1168
 
1165
1169
  declare interface DesignProps_4 {
1166
1170
  header: {
1167
1171
  isVisible: boolean;
1168
1172
  fontStyle: FontStyle;
1169
- prefix: string;
1170
1173
  };
1171
- price: {
1172
- isVisible: boolean;
1173
- fontStyle: FontStyle;
1174
- };
1175
- contractEndDate: {
1176
- isVisible: boolean;
1177
- fontStyle: FontStyle;
1178
- prefix: string;
1174
+ functions: {
1175
+ allowEdit: boolean;
1176
+ showExpiration: boolean;
1179
1177
  };
1180
1178
  }
1181
1179
 
1182
1180
  declare interface DesignProps_5 {
1183
1181
  header: {
1182
+ isVisible: boolean;
1183
+ title: {
1184
+ fontStyle: FontStyle;
1185
+ };
1186
+ description: {
1187
+ isVisible: boolean;
1188
+ fontStyle: FontStyle;
1189
+ };
1190
+ price: {
1191
+ isVisible: boolean;
1192
+ fontStyle: FontStyle;
1193
+ };
1194
+ };
1195
+ addOns: {
1184
1196
  isVisible: boolean;
1185
1197
  fontStyle: FontStyle;
1198
+ showLabel: boolean;
1186
1199
  };
1187
- functions: {
1188
- allowEdit: boolean;
1189
- showExpiration: boolean;
1200
+ callToAction: {
1201
+ isVisible: boolean;
1202
+ buttonSize: "sm" | "md" | "lg";
1203
+ buttonStyle: "primary" | "secondary" | "tertiary";
1190
1204
  };
1191
1205
  }
1192
1206
 
@@ -1194,22 +1208,16 @@ declare interface DesignProps_6 {
1194
1208
  header: {
1195
1209
  isVisible: boolean;
1196
1210
  fontStyle: FontStyle;
1211
+ prefix: string;
1197
1212
  };
1198
- date: {
1199
- isVisible: boolean;
1200
- fontStyle: FontStyle;
1201
- };
1202
- amount: {
1213
+ price: {
1203
1214
  isVisible: boolean;
1204
1215
  fontStyle: FontStyle;
1205
1216
  };
1206
- limit: {
1207
- isVisible: boolean;
1208
- number: number;
1209
- };
1210
- collapse: {
1217
+ contractEndDate: {
1211
1218
  isVisible: boolean;
1212
1219
  fontStyle: FontStyle;
1220
+ prefix: string;
1213
1221
  };
1214
1222
  }
1215
1223
 
@@ -1224,6 +1232,12 @@ declare interface ElementProps {
1224
1232
  style?: React.CSSProperties;
1225
1233
  }
1226
1234
 
1235
+ export declare const EmbedButton: IStyledComponentBase<"web", Substitute<ButtonProps, {
1236
+ $size?: "sm" | "md" | "lg";
1237
+ $color?: "primary" | "secondary" | "tertiary";
1238
+ $variant?: "outline" | "filled";
1239
+ }>> & string & Omit<({ color, size, variant, disabled, isLoading, children, ...props }: ButtonProps) => JSX_2.Element, keyof Component<any, {}, any>>;
1240
+
1227
1241
  export declare const EmbedContext: Context<EmbedContextProps>;
1228
1242
 
1229
1243
  export declare interface EmbedContextProps {
@@ -1232,6 +1246,7 @@ export declare interface EmbedContextProps {
1232
1246
  nodes: SerializedNodeWithChildren[];
1233
1247
  settings: EmbedSettings;
1234
1248
  layout: EmbedLayout;
1249
+ mode: EmbedMode;
1235
1250
  error?: Error;
1236
1251
  isPending: boolean;
1237
1252
  hydrate: () => void;
@@ -1242,19 +1257,22 @@ export declare interface EmbedContextProps {
1242
1257
 
1243
1258
  export declare type EmbedLayout = "portal" | "checkout" | "payment" | "success" | "disabled";
1244
1259
 
1260
+ export declare type EmbedMode = "edit" | "view";
1261
+
1245
1262
  export declare interface EmbedProps {
1246
1263
  accessToken?: string;
1247
1264
  id?: string;
1248
1265
  apiConfig?: ConfigurationParameters;
1249
1266
  }
1250
1267
 
1251
- export declare const EmbedProvider: ({ id, accessToken, apiConfig, children, }: EmbedProviderProps) => JSX_2.Element;
1268
+ export declare const EmbedProvider: ({ id, accessToken, apiConfig, children, mode, }: EmbedProviderProps) => JSX_2.Element;
1252
1269
 
1253
1270
  export declare interface EmbedProviderProps {
1254
1271
  id?: string;
1255
1272
  accessToken?: string;
1256
1273
  apiConfig?: ConfigurationParameters;
1257
1274
  children?: React.ReactNode;
1275
+ mode?: EmbedMode;
1258
1276
  }
1259
1277
 
1260
1278
  export declare type EmbedSettings = {
@@ -1952,6 +1970,49 @@ ref?: ((instance: HTMLDivElement | null) => void | DO_NOT_USE_OR_YOU_WILL_BE_FIR
1952
1970
 
1953
1971
  export declare type FontStyle = keyof EmbedThemeSettings["typography"];
1954
1972
 
1973
+ /**
1974
+ * Schematic API
1975
+ * Schematic API
1976
+ *
1977
+ * The version of the OpenAPI document: 0.1
1978
+ *
1979
+ *
1980
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1981
+ * https://openapi-generator.tech
1982
+ * Do not edit the class manually.
1983
+ */
1984
+ /**
1985
+ *
1986
+ * @export
1987
+ * @interface GenericPreviewObject
1988
+ */
1989
+ declare interface GenericPreviewObject {
1990
+ /**
1991
+ *
1992
+ * @type {string}
1993
+ * @memberof GenericPreviewObject
1994
+ */
1995
+ description?: string | null;
1996
+ /**
1997
+ *
1998
+ * @type {string}
1999
+ * @memberof GenericPreviewObject
2000
+ */
2001
+ id: string;
2002
+ /**
2003
+ *
2004
+ * @type {string}
2005
+ * @memberof GenericPreviewObject
2006
+ */
2007
+ imageUrl?: string | null;
2008
+ /**
2009
+ *
2010
+ * @type {string}
2011
+ * @memberof GenericPreviewObject
2012
+ */
2013
+ name: string;
2014
+ }
2015
+
1955
2016
  declare interface GetSetupIntentRequest {
1956
2017
  componentId: string;
1957
2018
  }
@@ -2036,9 +2097,9 @@ export declare interface IconRoundProps extends React.HTMLAttributes<HTMLElement
2036
2097
  colors?: [string, string];
2037
2098
  }
2038
2099
 
2039
- export declare const IncludedFeatures: ForwardRefExoticComponent<ElementProps & RecursivePartial<DesignProps_2> & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement | null>>;
2100
+ export declare const IncludedFeatures: ForwardRefExoticComponent<ElementProps & RecursivePartial<DesignProps> & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement | null>>;
2040
2101
 
2041
- export declare type IncludedFeaturesProps = DesignProps_2;
2102
+ export declare type IncludedFeaturesProps = DesignProps;
2042
2103
 
2043
2104
  declare type InitOverrideFunction = (requestContext: {
2044
2105
  init: HTTPRequestInit;
@@ -2166,11 +2227,11 @@ declare interface InvoiceResponseData {
2166
2227
  url?: string | null;
2167
2228
  }
2168
2229
 
2169
- export declare const Invoices: ForwardRefExoticComponent<ElementProps & DesignProps_6 & {
2230
+ export declare const Invoices: ForwardRefExoticComponent<ElementProps & DesignProps_2 & {
2170
2231
  data?: ListInvoicesResponse["data"];
2171
2232
  } & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement | null>>;
2172
2233
 
2173
- export declare type InvoicesProps = DesignProps_6 & {
2234
+ export declare type InvoicesProps = DesignProps_2 & {
2174
2235
  data?: ListInvoicesResponse["data"];
2175
2236
  };
2176
2237
 
@@ -2283,11 +2344,11 @@ declare interface PaymentFormProps {
2283
2344
  onConfirm?: (paymentMethodId: string) => void;
2284
2345
  }
2285
2346
 
2286
- export declare const PaymentMethod: ForwardRefExoticComponent<ElementProps & RecursivePartial<DesignProps_5> & HTMLAttributes<HTMLDivElement> & {
2347
+ export declare const PaymentMethod: ForwardRefExoticComponent<ElementProps & RecursivePartial<DesignProps_4> & HTMLAttributes<HTMLDivElement> & {
2287
2348
  portal?: HTMLElement | null;
2288
2349
  } & RefAttributes<HTMLDivElement | null>>;
2289
2350
 
2290
- export declare type PaymentMethodProps = DesignProps_5;
2351
+ export declare type PaymentMethodProps = DesignProps_4;
2291
2352
 
2292
2353
  /**
2293
2354
  * Schematic API
@@ -2514,11 +2575,11 @@ declare interface PlanEntitlementResponseData {
2514
2575
  valueType: string;
2515
2576
  }
2516
2577
 
2517
- export declare const PlanManager: ForwardRefExoticComponent<ElementProps & RecursivePartial<DesignProps> & HTMLAttributes<HTMLDivElement> & {
2578
+ export declare const PlanManager: ForwardRefExoticComponent<ElementProps & RecursivePartial<DesignProps_5> & HTMLAttributes<HTMLDivElement> & {
2518
2579
  portal?: HTMLElement | null;
2519
2580
  } & RefAttributes<HTMLDivElement | null>>;
2520
2581
 
2521
- export declare type PlanManagerProps = DesignProps;
2582
+ export declare type PlanManagerProps = DesignProps_5;
2522
2583
 
2523
2584
  /**
2524
2585
  * Schematic API
@@ -3170,6 +3231,8 @@ declare interface StripeEmbedInfo {
3170
3231
  setupIntentClientSecret?: string | null;
3171
3232
  }
3172
3233
 
3234
+ export declare const StyledCard: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3235
+
3173
3236
  declare const Text_2: IStyledComponentBase<"web", Substitute<FastOmit<Substitute<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, Omit<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
3174
3237
  ref?: ((instance: HTMLSpanElement | null) => void | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLSpanElement> | null | undefined;
3175
3238
  }>, never>, TextProps>> & string;
@@ -3190,6 +3253,13 @@ export declare interface TextProps extends ComponentProps {
3190
3253
  $lineHeight?: ComponentProps["$lineHeight"];
3191
3254
  }
3192
3255
 
3256
+ export declare const Tooltip: ({ label, description }: TooltipProps) => JSX_2.Element;
3257
+
3258
+ declare interface TooltipProps {
3259
+ label: string;
3260
+ description: string;
3261
+ }
3262
+
3193
3263
  declare type TransientCSSProperties = {
3194
3264
  [Property in keyof React.CSSProperties as `$${string & Property}`]: React.CSSProperties[Property];
3195
3265
  };
@@ -3201,9 +3271,9 @@ export declare interface TypographySettings {
3201
3271
  color: string;
3202
3272
  }
3203
3273
 
3204
- export declare const UpcomingBill: ForwardRefExoticComponent<ElementProps & RecursivePartial<DesignProps_4> & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement | null>>;
3274
+ export declare const UpcomingBill: ForwardRefExoticComponent<ElementProps & RecursivePartial<DesignProps_6> & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement | null>>;
3205
3275
 
3206
- export declare type UpcomingBillProps = DesignProps_4;
3276
+ export declare type UpcomingBillProps = DesignProps_6;
3207
3277
 
3208
3278
  declare interface UpdatePaymentMethodRequest {
3209
3279
  updatePaymentMethodRequestBody: UpdatePaymentMethodRequestBody;